Equality constraint type mismatch
red5_2 at hotmail.com
Mon Mar 8 14:19:05 EST 2010
I see. The type inference algorithm requires type variables to betype constructors, not functions. Equality constraints aresimplified assuming that is the case. I knew that typefunctions had to be fully applied, but I didn't know that they alsocouldn't be "taken apart" by unification. This explains why thefollowing doesn't typecheck:type family T a :: *my_id :: f a -> f a; my_id = idx :: T a -> T a; x = my_idIMHO, this was not clear from the documentation or from the errormessage (It certainly _looks_ like "T a" should match "f a"...).Thanks for the explanation.-heatsink
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
More information about the Glasgow-haskell-users