Consider the following:

 class Path p where ...

 class Path p => CompletePath p where ...

 class Path p => IncompletePath p where
   type CompletedPath p :: *

Obviously, the idea is that CompletedPath Foo (where Foo is an IncompletePath) should yield some type which is a CompletePath. However, the source code does not actually state this, so GHC (rightly) complains that it was unable to deduce this constraint from the actual code written.

Is it possible to state this constraint? If so, how? (And if not, the answer, presumably, is to fundamentally redesign the whole thing...)

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to