[Haskell] Annoying naming clashes

Ben.Yu at combined.com Ben.Yu at combined.com
Tue Jun 15 11:30:57 EDT 2004

> Don't export your data constructors because you then expose the
> internals of your module, which is bad for abstraction; export function
> names which serve as the data constructors instead.

Actually this is another thing that I'm wondering about.

it is nice to use 'maybe', 'either' functions. However, with data types
with more than 2 constructors, using such function tends to be tedious than
pattern match, where, you can pick specific constructors of interest.

And in order to use pattern match, I have to expose my constructors.

This message is intended only for the addressee and may contain information
that is confidential or privileged. Unauthorized use is strictly prohibited
and may be unlawful. If you are not the intended recipient, or the person
responsible for delivering to the intended recipient, you should not read,
copy, disclose or otherwise use this message, except for the purpose of
delivery to the addressee. If you have received this email in error, please
delete and advise us immediately.

More information about the Haskell mailing list