Modules and their explicit export lists (are an annoyance)
Felipe Lessa
felipe.lessa at gmail.com
Sat Jun 19 21:00:05 EDT 2010
On Sat, Jun 19, 2010 at 08:38:52PM +0200, Christian Höner zu Siederdissen wrote:
> But the more important thing is, that it makes extending module
> functionality a pain (eg. if a constructor is not exported using (..)).
I think this is another problem. Sure, without export lists you
*currently* can't hide those constructors. However, languages
like Java don't have export lists as well. Imagine if we could
write this in Haskell:
private data Foo a = Foo a (Foo (Either a a))
Now, about the exports lists: they are useful to hide internal
functions. I have many modules where I define functions that are
not interesting outside that module.
Cheers,
--
Felipe.
More information about the Glasgow-haskell-users
mailing list