Functional dependencies aren't fully implemented in 4.08 I'm afraid, and won't ever be. It'll be significantly better in 5.0, but we won't release that for a while yet. (Unless you care to build from the CVS tree.) Simon | -----Original Message----- | From: Sebastien Carlier [mailto:sebastien@posse42.net] | Sent: 19 December 2000 14:15 | To: haskell@haskell.org | Subject: Excessive restriction in ghc ? | | | Hello. | | I am getting an error message from ghc 4.08.1 with | the following code: | | > class Collection e ce | ce -> e where | > empty :: ce | > insert :: e -> ce -> ce | > | > class (Eq e, Collection e ce) => Set e ce where | > member :: e -> ce -> Bool | > union :: ce -> ce -> ce | | Main.lhs:7: | Class type variable `e' does not appear in method signature | union :: {- implicit forall -} ce -> ce -> ce | | Since `ce' uniquely determines `e', I would expect the | compiler to assume that `e' appears in the method signature. | Either I am misunderstanding something, or something may be | missing in the compiler around rename/RnSource.lhs:249. | | Regards, | Sebastien Carlier | | | | _______________________________________________ | Haskell mailing list | Haskell@haskell.org | http://www.haskell.org/mailman/listinfo/haskell |