
14 Jun
2011
14 Jun
'11
10:52 p.m.
Dan Doel wrote:
class C a b | a -> b where foo :: a -> b foo = error "Yo dawg."
instance C a b where
The instance 'C a b' blatantly violates functional dependency and should not have been accepted. The fact that it was is a known bug in GHC. The bug keeps getting mentioned on Haskell mailing lists about every year. Alas, it is still not fixed. Here is one of the earlier messages about it: http://www.haskell.org/pipermail/haskell-cafe/2007-March/023916.html HList does NOT depend on that invalid behavior. The bug is relatively recent (introduced around 2006); HList worked in 2004.