[GHC] #7668: Location in -fdefer-type-errors
GHC
cvs-ghc at haskell.org
Wed Feb 6 19:28:49 CET 2013
#7668: Location in -fdefer-type-errors
-----------------------------+----------------------------------------------
Reporter: monoidal | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.6.2 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Blockedby:
Blocking: | Related:
-----------------------------+----------------------------------------------
Consider
{{{
x :: Char
x = 'x' + 1
y :: Char
y = 'y' + 1
}}}
Run `ghci -fdefer-type-errors`:
{{{
*Main> x
*** Exception: G.hs:5:9:
No instance for (Num Char) arising from a use of `+'
In the expression: 'y' + 1
In an equation for `y': y = 'y' + 1
(deferred type error)
*Main> y
*** Exception: G.hs:5:9:
No instance for (Num Char) arising from a use of `+'
In the expression: 'y' + 1
In an equation for `y': y = 'y' + 1
(deferred type error)
}}}
The first exception is wrong. It seems that the missing `Num Char`
instance is filled with the same error message in all places where the
constraint should be supplied.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7668>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list