Equality constraint type mismatch
Simon Peyton-Jones
simonpj at microsoft.com
Tue Mar 9 03:03:35 EST 2010
| type family T a :: *
| my_id :: f a -> f a; my_id = id
| x :: T a -> T a; x = my_id
|
|
| IMHO, this was not clear from the documentation or from the error
| message (It certainly _looks_ like "T a" should match "f a"...).
| Thanks for the explanation.
Did you read this?
http://haskell.org/haskellwiki/GHC/Type_families#Injectivity.2C_type_inference.2C_and_ambiguity
Please edit it to improve the clarity, or add a whole new sub-section if you think that would be clearer. It's a wiki.
Simon
More information about the Glasgow-haskell-users
mailing list