Skip to content

Improve error message when `main' is not of the right type

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.

Trac metadata
Trac field Value
Version 6.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information