
At Sat, 29 Sep 2012 10:30:07 +0200, Francesco Mazzoli wrote:
Then I'd also like to have
newtype TST sym algo = <...>
instance (Ord sym, ListLike full sym) => Search (TST sym algo) full algo
This one is a different problem - it requires UndecidableInstances and I don't understand why. It seems to me that the coverage condition (http://www.haskell.org/ghc/docs/latest/html/users_guide/type-class-extension..., point 7.6.3.2) is too strict in these cases. But this is not that important.
This doesn't make sense with the code posted (which would require sensibly UndecidableInstances), I meant something like this (I don't have "actual" code to show the problem): data Foo a class Bar a b | a -> b class Quux a b | a -> b instance Bar a b => Quux (Foo a) b -- Francesco * Often in error, never in doubt