#3169: Bad occurs-check error message
--------------------------------------+-------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: closed
Priority: low | Milestone: 7.0.2
Component: Compiler (Type checker) | Version: 6.10.2
Resolution: fixed | Keywords:
Testcase: gadt/T3169 | Blockedby:
Difficulty: Unknown | Os: Unknown/Multiple
Blocking: | Architecture: Unknown/Multiple
Failure: None/Unknown |
--------------------------------------+-------------------------------------
Changes (by simonpj):
* status: new => closed
* testcase: => gadt/T3169
* resolution: => fixed
Comment:
Happily with the new type checker the error message is almost exactly as I
said it should be 22 months ago:
{{{
T3169.hs:13:13:
Couldn't match type `elt' with `Map b elt'
`elt' is a rigid type variable bound by
the type signature for
lookup :: (a, b) -> Map (a, b) elt -> Maybe elt
at T3169.hs:12:3
Expected type: Maybe (Map b elt)
Actual type: Maybe elt
In the return type of a call of `lookup'
In the expression: lookup a m :: Maybe (Map b elt)
}}}
I've added a regression test, and will close.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3169#comment:8>
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