GHC Poll: scope in GHCi

Simon Marlow simonmar@microsoft.com
Wed, 9 Jan 2002 14:55:33 -0000


> Is there any haskell interpreter done it already?
> Hugs and hmake support ":also" command. I don't know
> now exactly it works, but quick test showed than
> it (sometimes) helps to mix scopes:
>=20
> Hi (hmake/nhc98):
> ------- begin cut
> Prelude> :also Maybe
> [Std   module... /usr/local/opt/nhc98/include/nhc98/Prelude.hi]
> [Std   module... /usr/local/opt/nhc98/include/nhc98/Maybe.hi]
> Maybe> print "a"
> "a"         =20
> Maybe> :also IO
> [Std   module... /usr/local/opt/nhc98/include/nhc98/Prelude.hi]
> [Std   module... /usr/local/opt/nhc98/include/nhc98/Maybe.hi]
> [Std   module... /usr/local/opt/nhc98/include/nhc98/IO.hi]
> IO> listToMaybe [1]
> Just 1      =20
> ------- end cut

Hugs's :also is the same as GHC's :add; it causes another module to be
loaded without throwing away the existing loaded set, and it changes the
scope to the new module.

Hi seems to be doing something slightly different, but I can't find any
documentation on Hi's :also command.

Cheers,
	Simon