[ ghc-Bugs-1293181 ] reporting the origin of kind errors
SourceForge.net
noreply at sourceforge.net
Fri Sep 16 15:13:51 EDT 2005
Bugs item #1293181, was opened at 2005-09-16 19:13
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1293181&group_id=8032
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Compiler (Type checker)
Group: 6.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Chris Rodrigues (nokta_kanto)
Assigned to: Nobody/Anonymous (nobody)
Summary: reporting the origin of kind errors
Initial Comment:
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'
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1293181&group_id=8032
More information about the Glasgow-haskell-bugs
mailing list