
I would be very grateful if someone could tell me what I'm doing wrong. Here's my code: ----- {-# LANGUAGE MultiParamTypeClasses #-} class Eq a => Graph g a where nodes :: g a -> [a] neighbours :: g a -> a -> [a] data WeightedGraph a w = WeightedGraph [(a, a, w)] instance Eq a => Graph a (WeightedGraph w a) where nodes = [] --stub neighbours = [] --stub ----- And here's the error message: temp.hs:9:24: Kind mis-match The first argument of `Graph' should have kind `* -> *', but `a' has kind `*' In the instance declaration for `Graph a (WeightedGraph w a)'