#2179: Improve error message when `main' is not of the right type
-------------------------------+--------------------------------------------
    Reporter:  amiddelk        |       Owner:          
        Type:  proposal        |      Status:  new     
    Priority:  normal          |   Component:  Compiler
     Version:  6.8.2           |    Severity:  trivial 
    Keywords:                  |    Testcase:          
Architecture:  x86_64 (amd64)  |          Os:  Linux   
-------------------------------+--------------------------------------------
 If you run the following module with GHC(i):

 > module Main where
 > main = "hi"

 You get the error message:

 > Couldn't match expected type `IO a' against inferred type `[Char]'
 > In the first argument of `GHC.TopHandler.runMainIO', namely `main'
 > When checking the type of the function `main'

 The error message would be a bit nicer if the second line was hidden.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2179>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to