-- e.g. RTER (a,b) r = (r a, r b)
class (MKLT (TOL base) ~ base) => Tupled base where
-- | Apply r to each element of the tuple
- type RTER base (r :: k -> *) :: *
+ type RTER base (r :: * -> *) :: *
-- | Go from the tuple representation to a promoted list;
-- the inverse of MKLT (as asserted by class constraints).
- type TOL base :: [k]
+ type TOL base :: [*]
-- | Send a tuple to an HList
tupleHL :: base -> HList (TOL base)
MKRLT (RTR arred) (TOL (RTE arred)) ~ arred
)
=> RTupled arred where
- type RTR arred :: (k -> *)
- type RTE arred :: k
+ type RTR arred :: (* -> *)
+ type RTE arred :: *
-- | Eliminate an rtuple out to a list.
tupleopEL :: (RTR arred ~ r) => (forall x . r x -> a) -> arred -> [a]