separate class and type namespace
simonmar at microsoft.com
Tue Jan 31 04:52:22 EST 2006
On 31 January 2006 03:42, John Meacham wrote:
> What do people think about seperating the class and type namespaces?
> one can always tell the difference syntactically which is meant, the
> thing keeping them in the same space in jhc is an artificial check to
> ensure you don't create some of the same name.
> the only issue is in export/import lists if you wanted to allow
> import/export of the type independently of the class. however the
> proposed explicit namespace change to the import/export syntax would
> solve this too and it is unlikely to actually be a problem in
I've always liked the idea of saying 'class C' or 'type T' in
It could be made backwards compatible: we allow types and classes to be
named the same, but in this case the export list has to use the new
syntax to disambiguate. The idea would be to transition to the new
There's a choice about whether a newtype should be exported with
'newtype T' or 'data T', or either.
More information about the Haskell-prime