Export lists in modules

Simon Marlow simonmar at microsoft.com
Thu Feb 23 06:41:11 EST 2006


On 23 February 2006 11:14, Malcolm Wallace wrote:

> "Simon Marlow" <simonmar at microsoft.com> wrote:

>> 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
>> --------------------------------------
> 
> But, apart from adding fuller signatures than I proposed, that is
> exactly the same as an export list, modulo some very minor syntactic
> differences!

Of course it's the same as the export list, but with different syntax,
and extended to allow specifying the full interface.  That's the point
;-)

The main difference is that I'm doing away with parentheses, commas, and
export specifiers, and using layout and full declaration syntax instead.
(I don't really want to discuss this very rough idea any more though,
it's just a distraction, and I'm not sure I like it anyway).

Cheers,
	Simon


More information about the Haskell-prime mailing list