export lists

Keith Wansbrough Keith.Wansbrough@cl.cam.ac.uk
Thu, 28 Jun 2001 10:19:28 +0100


Hamilton Richards wrote:

> Michael Ackerman wrote:
>
> >module Foo (a) where
> >a = 0
> >b = 1
> >
> >and then load Foo, both a and b are visible. What am I doing wrong? Any
> >help will be appreciated.
> 
> Both a and b are visible on the command line, but b will not be visible in
> any module that imports Foo.

To elaborate: after loading module Foo into Hugs, you are "inside" the
module Foo (as the prompt "Foo>" indicates).  This means you can see
everything in scope in that module.  If you then load another module,
say Main, that imports Foo, you will only be able to see Foo's
exports, not its internal functions.

--KW 8-)


-- 
Keith Wansbrough <kw217@cl.cam.ac.uk>
http://www.cl.cam.ac.uk/users/kw217/
Cambridge University Computer Laboratory.