#1614: Type checker does not use fundep to avoid ambiguity
----------------------------------------+-----------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.8
Component: Compiler (Type checker) | Version: 6.7
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: MacOS X | Testcase:
Architecture: x86 |
----------------------------------------+-----------------------------------
Comment (by chak):
This works with the latest head:
{{{
{-# OPTIONS_GHC -fglasgow-exts #-}
module E where
data E v a = E a
data RValue
instance (v ~ RValue, Eq a) => Eq (E v a) where
E x == E y = x == y
a :: E v Int
a = undefined
foo = a == a
}}}
So, I agree with SimonPJ, death to functional dependencies. This solution
was btw SimonPJ's idea (he just couldn't test it as his latest build
wasn't complete yet.)
`t1 ~ t2` is an equality constraint and part of the type families patch
that landed in the head yesterday.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1614>
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