[Haskell-cafe] Constraints at construction

Bit Connor bit at mutantlemon.com
Sat Oct 11 15:54:22 EDT 2008

On Thu, Oct 9, 2008 at 3:05 PM, Mitchell, Neil
<neil.mitchell.2 at credit-suisse.com> wrote:
> Hi Iain,
> The wiki page has quite a nice article:
> http://www.haskell.org/haskellwiki/Smart_constructors

Smart constructors are nice but if your module doesn't also export the
regular constructor then you can't pattern match against it.

It would be cool if there was a way to export constructors from a
module, but only for use in pattern matching and not constructing new


More information about the Haskell-Cafe mailing list