18.03.2011, 14:22, "Roel van Dijk" <[email protected]>;:

>  Remember that constructors are functions, except that you can't
>  pattern match against them.

..

>  The downside is that you can't pattern-match against these functions.

The thing is that I need pattern matching, just functions won't do.

Anyway, a new question arose.  If I have already declared a type, can I add new 
constructors to it from other modules?

Maybe there are some GHC extensions to solve both these problems.

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to