GHC from CVS HEAD does not require that the Main module export "main"

Brian Smith brianlsmith at gmail.com
Mon Jun 13 17:58:43 EDT 2005


The Haskell 98 report says "A Haskell program is a collection of
modules, one of which, by convention, must be called Main and must
export the value main." However, the program below builds and executes
fine.

module Main() -- should be "module Main" or "module Main(main)"
where
main = putStrLn "Hello, World"

$ runghc Main.hs
Hello, World



More information about the Glasgow-haskell-bugs mailing list