
This code gives me a Kind error because IVal isn't applied to enough type arguments. import qualified Set class Table table indexVal | indexVal->table where --insertIndex::item->indexVal item -> table item ->table item union::table item -> table item -> table item --union t1 t2 = t1 data DBTable item = DBTable data IVal item = Name item instance Table DBTable (IVal ) where Weirdly, when I uncomment the insertIndex function, things work. But, if I then uncomment the default implementation of union, I get: No instance for (Table DBTable indexVal) arising from use of `Main.$dmunion' at example.hs:13 In the definition of `union': union = Main.$dmunion In the definition for method `union' In the instance declaration for `Table DBTable IVal' I don't know what this error even means. But it goes away if I put the union implementation in the instance rather than in the class. Bot these error messages seem unreasonable. Can someone clarify? Note: I am using GHC 6.2.2 -Alex- ______________________________________________________________ S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com