[GHC] #7765: Odd error message for `runghc` with missing `main` function.

GHC cvs-ghc at haskell.org
Wed Mar 13 16:16:02 CET 2013


#7765: Odd error message for `runghc` with missing `main` function.
---------------------------------+------------------------------------------
    Reporter:  isaacdupree       |       Owner:  igloo           
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  Compiler          |     Version:  7.6.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by simonpj):

 Oh, sorry, I meant that it should say
 {{{
 what.hs:1:1: The function `main' is not defined in module `Main'
 }}}
 If instead it was
 {{{
 module What2 where
 foo = True
 }}}
 and you said
 {{{
 ght -e bar What2.hs
 }}}
 then a "not in scope" message would make more sense.  But in the common
 case of 'main' (which is what happens with `runghc`), the `No main in
 Main` message is better

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7765#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list