Opened 12 years ago

Closed 12 years ago

Last modified 48 years ago

#460 closed bug (Fixed)

reporting the origin of kind errors

Reported by: nokta_kanto Owned by: nobody
Priority: normal Milestone:
Component: Compiler (Type checker) Version: 6.4
Keywords: Cc:
Operating System: Architecture:
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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 
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: 
    Couldn't match kind `*' against `k_a16S -> *' 
    In the class declaration for `Name' 

Change History (2)

comment:1 Changed 12 years ago by simonpj

Logged In: YES 

Happily this one is fixed already: (Will be in 6.4.1)

    Kind error: `Name a' is not applied to enough type 
    In the data type declaration for `Exp'

Thanks for reporting it

comment:2 Changed 12 years ago by simonpj

Status: assignedclosed
Note: See TracTickets for help on using tickets.