Module creation
Glynn Clements
glynn.clements at virgin.net
Fri Jan 2 02:24:35 EST 2004
J & M van Berchem wrote:
> New to Haskell, I got a version, through Fink, for my Mac OS X. I like
> the interpreter very much, but I do not see how I may get out of "Prelude"
> in order to write a program.
Use a text editor, then load the file with ":load Foo.hs".
You can't type definitions into the hugs/ghci interpreter, just
expressions; definitions have to be loaded from a file.
[Actually, ghci is slightly more liberal; it also allows let forms
(e.g. "let foo = ...") and IO actions (e.g. "foo <- getLine").]
--
Glynn Clements <glynn.clements at virgin.net>
More information about the Haskell-Cafe
mailing list