| Well, here's another problem I've encountered.  Consider this module:
|
|       module M(T) where
|       data T = T
|
| Is this legal?  Clearly I am just trying to export the type T, but it happens
| that the type has a constructor with the same name.  Naming a constructor
| in the export list is explicitely forbidden.  How can the compiler tell
| if I intended naming the constructor or type in the export list?

This one is easy (I think) (for a change).  The module above is quite legal,
and exports the type T but not the constructor.  If you wanted the
constructor to go too, you can write

        module M( T(..) )

or

        module M( T(T) )

Simon

Reply via email to