
30 Nov
2014
30 Nov
'14
4:57 a.m.
Hi. [...]
My goal is to have a thing like that: type family Product (v :: Branch) (a :: k1) (b :: k2) :: (Either k1 k2) where
I'm not sure what exactly it is that you want, but this code checks: {-# LANGUAGE DataKinds, PolyKinds, TypeFamilies #-} module PairEitherKinds where data Branch = L | R type family Product (s :: Branch) (a :: k1) (b :: k2) :: Either k1 k2 where Product L a b = Left a Product R a b = Right b Cheers, Andres