2008/4/8, Manuel M T Chakravarty <[EMAIL PROTECTED]>: > You need to write the instance as > > instance (b ~ TheFoo a, Foo a) => Bar (Either a b) where > bar (Left a) = foo' a > bar (Right b) = foo' (foo b :: a) >
If you do that, the program compile, but res still raise a panic in GHC6.8.2 . Before you sent your solution, I also tried to do class (TheFoo a ~ b) => Foo a b where ... instance (Foo a b) => Bar (Either a b) where ... But it didn't compile, it seems to me both versions should have the same behaviour ? -- Jedaï _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe