logo       

Re: [GHC] #414: GHC does not eforce that Main exports main: msg#00097

lang.haskell.glasgow.bugs

Subject: Re: [GHC] #414: GHC does not eforce that Main exports main

#414: GHC does not eforce that Main exports main
-----------------------+----------------------------------------------------
Reporter: simonpj | Owner: nobody
Type: bug | Status: assigned
Priority: lowest | Milestone:
Component: Compiler | Version: 6.4.1
Severity: normal | Resolution: None
Keywords: | Os: Unknown
Difficulty: Unknown | Architecture: Unknown
-----------------------+----------------------------------------------------
Changes (by simonmar):

* version: None => 6.4.1

Old description:

> {{{
> 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
>
> Originally reported by Brian Smith
> [brianlsmith@xxxxxxxxx]
> }}}

New description:

{{{
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

Originally reported by Brian Smith
[brianlsmith@xxxxxxxxx]
}}}

--
Ticket URL: <http://cvs.haskell.org/trac/ghc/ticket/414>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise