On Jun 22, 2010, at 21:41 , Maciej Piechotka wrote: > test.hs:11:0: > Constraint is no smaller than the instance head > in the constraint: Functor (TestMonad a) > (Use -XUndecidableInstances to permit this) > In the instance declaration for `Functor (Testable a)' > > What is undecidable? a is bound so TestMonad a should be bound so > Functor (TestMonad a) should be valid.
I *think* the point of the error message is that Functor (TestMonad a) is a tautology, so including it doesn't actually constrain the instance (which in GHC-ese is "Constraint is no smaller than the instance head"). In short, GHC thinks you're being tricky in a way it can't understand, because otherwise there's no point in including the constraint, so it's telling you that being tricky requires UndecidableInstances. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [email protected] system administrator [openafs,heimdal,too many hats] [email protected] electrical and computer engineering, carnegie mellon university KF8NH _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
