#5246: Duplicate type error messages with implicit parameters
---------------------------------+------------------------------------------
Reporter: NickSmallbone | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler (Type checker)
Version: 7.0.3 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
The following ill-typed program generates two identical type errors at the
same source location:
{{{
{-# LANGUAGE ImplicitParams #-}
foo :: (?x :: Int) => a
foo = undefined
bar =
let ?x = "hello"
in foo
}}}
The error messages are:
{{{
Test.hs:8:8:
Couldn't match type `Int' with `[Char]'
In the expression: foo
In the expression: let ?x = "hello" in foo
In an equation for `bar': bar = let ?x = "hello" in foo
Test.hs:8:8:
Couldn't match type `Int' with `[Char]'
In the expression: foo
In the expression: let ?x = "hello" in foo
In an equation for `bar': bar = let ?x = "hello" in foo
}}}
Obviously, it should only print this error once. I encountered this in a
larger program where it meant I got ''eight'' identical type errors at the
same source position!
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5246>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs