[Haskell-cafe] Data constructor synonyms

Grigory Sarnitskiy sargrigory at ya.ru
Fri Mar 18 14:31:20 CET 2011


18.03.2011, 14:22, "Roel van Dijk" <vandijk.roel at gmail.com>;:

>  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.



More information about the Haskell-Cafe mailing list