#2627: GADT + Type family doesn't unify like I expect
-------------------------------------+--------------------------------------
Reporter: ryani | Owner: chak
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type checker) | Version: 6.9
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
-------------------------------------+--------------------------------------
Comment (by simonpj):
PS. The error message looks like
{{{
T2627.hs:19:13:
Couldn't match expected type `b2' against inferred type `Dual b1'
`b2' is a rigid type variable bound by
the constructor `Wr' at T2627.hs:19:13
In the pattern: Wr a r
In the definition of `conn': conn (Rd k) (Wr a r) = conn (k a) r
}}}
but I'd expect it to say something like "cannot deduce `(b2 ~ Dual b1)`
from from `(b ~ Dual a, a ~ Dual b, ... blah blah)`". The current error
message is really only right for things like "cannot unify `[a]` against
`Maybe Int`" or something.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2627#comment:2>
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