[ ghc-Bugs-1233278 ] GHC does not eforce that Main exports main

SourceForge.net noreply at sourceforge.net
Wed Jul 6 05:19:29 EDT 2005


Bugs item #1233278, was opened at 2005-07-06 09:19
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1233278&group_id=8032

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Compiler
Group: None
Status: Open
Resolution: None
Priority: 2
Submitted By: Simon Peyton Jones (simonpj)
Assigned to: Nobody/Anonymous (nobody)
Summary: GHC does not eforce that Main exports main

Initial Comment:
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 at gmail.com]

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1233278&group_id=8032



More information about the Glasgow-haskell-bugs mailing list