[Haskell] Instance declaration of classes with method type constraints

Johan Holmquist johho590 at student.liu.se
Thu Jun 30 11:55:12 EDT 2005


Perfect! Problem solved and now I understand about "kinds" of types.

   instance Rect (PRect a) a where ... 

works if "Num a" is added to it, like:

   instance Num a => Rect (PRect a) a where ...

(GHC has pretty informative error messages)

Thank you for great answers!

/johan


More information about the Haskell mailing list