logo       

GHC from CVS HEAD does not require that the Main module export "main": msg#00040

lang.haskell.glasgow.bugs

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

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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise