Hi Sean,
Sean Leather wrote:
Perhaps this isn't answering your question, but you can turn the above
into an associated type as follows.
class MkErrorAlg f where
type ErrorAlg (f :: (* -> *) -> * -> *) :: * -> * -> *
mkErrorAlg :: ErrorAlg f e a -> f (K0 a) ix -> Either e a
That is true. But how would you translate the following instance to the
new version?
type instance ErrorAlg (K b :*: f) e a = b -> ErrorAlg f e a
I don't know how to do that without introducing a new newtype that I can
partially parametrize. I don't want to have to introduce a newtype for
that, especially because it defeats the purpose of (in this specific
case) generically deriving a user-friendly type.
Groetjes,
Martijn.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe