cvs commit: hugs98/libraries Prelude.hs

Ross Paterson ross@soi.city.ac.uk
Sun, 8 Sep 2002 12:06:53 +0100


On Sat, Sep 07, 2002 at 07:28:20PM -0700, Sigbjorn Finne wrote:
> sof         2002/09/07 19:28:20 PDT
> 
>   Added files:
>     libraries            Prelude.hs 
>   Log:
>   A Haskell98 compliant Prelude

I'd been playing around with this myself, using Alastair's patch
(hugs-bugs, 17 Aug 2001).  It seems that your change allows only
one module under the Prelude, while Alastair's patch allows several,
though the first one (like your PrelImpl) is special.  Incidentally,
the hierarchical way would be to rename PrelImpl to Hugs.something (I
used Hugs.Base, by analogy with GHC.Base).  We might as well do that now,
even though it will be the only hierarchical module in the old setup.

Having multiple modules under the Prelude makes it possible to share
more with the hierarchical libraries.  I was using the Prelude out of
fptools/libraries/base, so at startup Hugs loads

	{Hugs}/libraries/Hugs/Base.hs
	{Hugs}/libraries/Data/Maybe.hs
	{Hugs}/libraries/Control/Monad.hs
	{Hugs}/libraries/Hugs/IO.hs
	{Hugs}/libraries/Hugs/IOExts.hs
	{Hugs}/libraries/System/IO/Error.hs
	{Hugs}/libraries/System/IO.hs
	{Hugs}/libraries/Text/Read.hs
	{Hugs}/libraries/Text/Show.hs
	{Hugs}/libraries/Data/List.hs
	{Hugs}/libraries/Data/Either.hs
	{Hugs}/libraries/Data/Bool.hs
	{Hugs}/libraries/Data/Tuple.hs
	{Hugs}/libraries/Prelude.hs

That also makes it possible to cut about 100 lines from Hugs.Base, and
remove some #ifndef __HUGS__ stuff from fptools/libraries.