> Here's a way that seems to work for me. I haven't tested in detail. > There may be problems, or also easier ways to achieve the same. The > DataKinds extension isn't essential. I've just used it for fun.
If I get it right, the trick is to use a *-kinded (instead of a *->*-kinded) argument for the class & instances and have a "type function" that is able to phantom-retag an already applied type-constructor `Foo_ Unres` to a differently applied type-constructor `Foo_ Res`.
The only thing that disturbs me is that I have to define explicit boilerplate type family declarations for all twenty or so non-polymorphic instances which'd look always the same, i.e.
type ResFun (t r) a = t a type ResArg (t r) a = t ~ a
...could that be defined as an override-able default somehow?