Export lists in modules
Wolfgang Jeltsch
wolfgang at jeltsch.net
Wed Feb 22 15:59:52 EST 2006
Am Mittwoch, 22. Februar 2006 18:27 schrieb Malcolm Wallace:
> [...]
> > But you don't need to go so far as to indicate the difference between
> > type/data/newtype - just differentiating classes from tycons is enough to
> > separate the namespaces.
>
> Yes. However it could be slightly confusing that one writes "newtype"
> in the module body, but "data" in the module header?
But whether a type is declared by data or by newtype is an implementation
detail, so this distinction shouldn't be made in a part of the code which is
supposed to specify an interface. On the other hand, if you export
constructors too, the distinction between newtype and data might be
important...
> [...]
> > BTW, I think Simon PJ was asking about how to *declare* types &
> > classes in export lists, given that you're adding signatures to export
> > lists which are a kind of declaration. If you want to put more of the
> > interface into the export list, shouldn't you put it all in?
>
> Yes, I see the point. In the fullness of time, perhaps we will indeed
> specify the module interface in full, including datatype definitions.
Only those parts of datatype definitions which are exported. And we would
have to include fixity declarations too.
> [...]
> Regards,
> Malcolm
Best wishes,
Wolfgang
More information about the Haskell-prime
mailing list