> I have a type family and a type class:
>
>  type family ErrorAlg (f :: (* -> *) -> * -> *) e ix :: *
>>
>
>  class MkErrorAlg f where
>>  mkErrorAlg :: ErrorAlg f e a -> f (K0 a) ix -> Either e a
>>
>
> Instances for these two really go hand in hand, so I thought I would move
> the type family into the type class.


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
>

Regards,
Sean
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to