[jhc] new extension in jhc: explicit namespaces in import/export lists

Roman Cheplyaka roma at ro-che.info
Mon Feb 13 08:26:57 CET 2012

* John Meacham <john at repetae.net> [2012-02-12 19:26:24-0800]
> In haskell 98 [...]

Not sure what you mean here. You aren't going to modify an existing
standard, are you? :)

> [...] a name such as 'Foo' in an export list will indicate that all of
> a class named Foo, a type named 'Foo' and a data constructor named
> 'Foo' shoud be exported.

This bit doesn't sound right... I think this behaviour would be
something that people will more often fight against (by using
namespaces) than appreciate. (Esp. that Foo exports both the type and
the data constructor.)

How about this:

Foo in the export list may refer to a class, a type or a kind (but not a
data constructor). It is an error if multiple entities with the name
Foo are in scope.

I see your point regarding 'hiding' inconsistency, but I'd prefer having
'hiding' fixed (in a similar way).

Roman I. Cheplyaka :: http://ro-che.info/

More information about the Haskell-prime mailing list