
The coverage condition is described in the paper http://research.microsoft.com/~simonpj/papers/fd-chr Use -fallow-undecidable-instances to make it compile. Simoin | -----Original Message----- | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users- | bounces@haskell.org] On Behalf Of Adrian Hey | Sent: 30 December 2006 23:26 | To: glasgow-haskell-users@haskell.org | Subject: Coverage Condition fails | | Hello folks, | | Could somebody explain what a coverage condition is and | what this error message means.. | | "Illegal instance declaration for 'GT (GT2 map1 map2) (k1,k2)' | (the Coverage Condition fails for one of the functional dependencies) | In the instance declaration for 'GT (GT2 map1 map2) (k1,k2)'" | | The offending code looks like this.. | | > -- Generalsed Trie map class | > class Ord k => GT map k | map -> k , k -> map where | | > -- Map type for pairs | > newtype (GT2 map1 map2 a) = GT2 (map1 (map2 a)) | | > -- Which is an instance of GT | > instance (GT map1 k1, GT map2 k2) => GT (GT2 map1 map2) (k1,k2) where | | This is with ghc 6.6. The strange thing is this code used to compile | fine with earlier versions (but I don't know if it actually worked | because I never tested it). | | Thanks | -- | Adrian Hey | | | | | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users