reporting the origin of kind errors
|Reported by:||nokta_kanto||Owned by:||nobody|
|Component:||Compiler (Type checker)||Version:||6.4|
|Type of failure:||Test Case:|
|Related Tickets:||Differential Revisions:|
This code produces a kind error in the class declaration. There is indeed a kind error, but I think the error message is somewhat misleading. It reports a kind error in the class declaration. The kind error is due to an inconsistency between usage of "Name" in the class and data declarations. It would make more sense to me if the kind error were reported in the data declaration, or if it contained some information on how the expected kind was inferred. -- beginning of code class (Show a, Eq a, Monad m) => Name m a where hashName :: a -> Int newName :: m a data Name a => Exp a -- end of code The error reported is: test2.hs:1:0: Couldn't match kind `*' against `k_a16S -> *' In the class declaration for `Name'
Change History (2)
Note: See TracTickets for help on using tickets.