[GHC] #9173: Better type error messages
GHC
ghc-devs at haskell.org
Fri Jun 6 07:39:42 UTC 2014
#9173: Better type error messages
-------------------------------------+------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by schyler):
Here's an error that a noob making a subtle typo might get from GHC:
{{{
Prelude> map 1 [1..5]
<interactive>:2:1:
Could not deduce (Num (a0 -> b))
arising from the ambiguity check for ‛it’
from the context (Num (a -> b), Num a, Enum a)
bound by the inferred type for ‛it’:
(Num (a -> b), Num a, Enum a) => [b]
at <interactive>:2:1-12
The type variable ‛a0’ is ambiguous
When checking that ‛it’
has the inferred type ‛forall a b.
(Num (a -> b), Num a, Enum a) =>
[b]’
Probable cause: the inferred type is ambiguous
}}}
I wholeheartedly agree that the information needs to be presented in a way
that's easier to digest.
For what should be a really simple error, I really have to stare that down
to understand what it's actually trying to say ...
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9173#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list