Export lists in modules

Simon Marlow simonmar at microsoft.com
Thu Feb 23 04:30:15 EST 2006

On 22 February 2006 17:27, Malcolm Wallace wrote:

> However, I would be
> equally happy to combine type/newtype/data into a single keyword for
> exports.

for the record, I am in favour of tagging export specifiers with 'class'
or 'type' (using 'type' for all type constructors, in light of yours and
John's points).

I'm not in favour of adding type signatures to export lists.  It's a
half way solution to specifying interfaces, and I'd rather design it
properly from scratch.  If modules are to contain interfaces, I don't
think extending the export list is the way to do it.  I'd rather do
something like:

modules M exports

class Eq a where
  (==) :: a -> a -> Bool

data T :: * -> *
f :: T -> Int
mkT :: Int -> T

where -- implementation below here

data T a = C a Int
f = ...

Not a proposal by any means, and I don't think that Haskell' should
tackle this, but this seems the right direction to me.


More information about the Haskell-prime mailing list