[Haskell-cafe] First steps in Haskell

Daniel Carrera daniel.carrera at zmsl.com
Sun Dec 18 11:42:45 EST 2005


Lemmih wrote:
> GHC is a compiler. If you want to compile to a binary then you must
> define a function called 'main'. Otherwise just load the file in ghci
> (`ghci fac.hs`).

I would expect GHC to be able to compile a program with a function that 
is not called 'main'. I wouldn't expect it to print anything when run, 
but I would expect it to compile.

`ghci fac.hs` doesn't give any errors. I don't understand why loading 
the file like that is ok but typing the entries is not. This might be a 
problem for people exporing the language.

Best,
Daniel.
-- 
      /\/`) http://oooauthors.org
     /\/_/  http://opendocumentfellowship.org
    /\/_/
    \/_/    I am not over-weight, I am under-tall.
    /


More information about the Haskell-Cafe mailing list