[GHC] #2179: Improve error message when `main' is not of the right
type
GHC
trac at galois.com
Thu Mar 27 09:00:26 EDT 2008
#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
More information about the Glasgow-haskell-bugs
mailing list