GHC error message on type mismatch

Simon Peyton-Jones simonpj at
Thu Nov 7 14:02:06 UTC 2013

The motivation is this. Consider

	f True

where f :: Int -> Char

  f *expects* an argument of type Int
  but the *actual* argument has type Bool

Does that help?


| -----Original Message-----
| From: Glasgow-haskell-users [mailto:glasgow-haskell-users-
| bounces at] On Behalf Of David Luposchainsky
| Sent: 07 November 2013 12:23
| To: Daniel Trstenjak; glasgow-haskell-users at
| Subject: Re: GHC error message on type mismatch
| On 2013-11-07 12:52, Daniel Trstenjak wrote:
| > My problem is with 'Expected' and 'Actual', that I'm often unsure if
| > the compiler is "expecting" something or if I'm the expecting one
| > and the same goes for "actual".
| Funny you mention it; I think I just got too used to the fact that every
| time I see this error I have to take a step back to remember what it
| means exactly. Renaming it to "given" or "provided" would really help.
| +1
| David
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at

More information about the Glasgow-haskell-users mailing list