Hello jean-christophe, Thursday, October 2, 2008, 1:46:20 PM, you wrote:
> If one wants to use pattern matching, afaik we had so-called views in early haskell versions. they proivide way to define two-way constructors - used for deconstruction via pattern-matching too views wa removed from haskell (or not included) in 1998 because they makes harder some theoretic operation, i don't remeber exactly finally, ghc now includes some form of active patterns which may be used to define your own way to decompose values. but their syntax isn't compatible with constructors so you can't define complex type which mimicks simple ones, and in particular you can replace simple type with complex one w/o rewriting all the client code imho it's serious lack in haskell support for Abstract Data Types -- Best regards, Bulat mailto:[EMAIL PROTECTED] _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe