Modules (again)

Marcin 'Qrczak' Kowalczyk qrczak@knm.org.pl
30 Aug 2001 08:39:26 GMT


Thu, 30 Aug 2001 00:56:25 -0700, Simon Peyton-Jones <simonpj@microsoft.com> pisze:

> As you gather your wits for ICFP, you may like to consider the following
> nice point (thanks to the OGI folk) in the Haskell 98 Report.  Is 
> the following legal? And if so, what is exported?
> 
> |           module M(module M) where
> |           import A as M

Legal. Exported is everything defined in this module and everything
exported from A. Unless there are name conflicts, when it's an error.

Now let's see if it agrees with your proposal:

> The second paragraph is unchanged.  The first paragraph encapsulates
> rather neatly what we want.  It answers questions like the one I opened 
> with (answer: all local defns and everything imported from A is
> exported).

Yes! I like your formulation.

-- 
 __("<  Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK