haskus-system-0.6.0.0: Haskus system programming framework

Safe HaskellNone
LanguageHaskell2010

Haskus.Utils.Variant

Description

Typed Variant type (union)

Synopsis

Documentation

data Variant l Source #

A variant contains a value whose type is at the given position in the type list

Instances

(Eq (Variant xs), Eq x) => Eq (Variant ((:) * x xs)) Source # 

Methods

(==) :: Variant ((* ': x) xs) -> Variant ((* ': x) xs) -> Bool #

(/=) :: Variant ((* ': x) xs) -> Variant ((* ': x) xs) -> Bool #

Eq (Variant ([] *)) Source # 

Methods

(==) :: Variant [*] -> Variant [*] -> Bool #

(/=) :: Variant [*] -> Variant [*] -> Bool #

(Ord (Variant xs), Ord x) => Ord (Variant ((:) * x xs)) Source # 

Methods

compare :: Variant ((* ': x) xs) -> Variant ((* ': x) xs) -> Ordering #

(<) :: Variant ((* ': x) xs) -> Variant ((* ': x) xs) -> Bool #

(<=) :: Variant ((* ': x) xs) -> Variant ((* ': x) xs) -> Bool #

(>) :: Variant ((* ': x) xs) -> Variant ((* ': x) xs) -> Bool #

(>=) :: Variant ((* ': x) xs) -> Variant ((* ': x) xs) -> Bool #

max :: Variant ((* ': x) xs) -> Variant ((* ': x) xs) -> Variant ((* ': x) xs) #

min :: Variant ((* ': x) xs) -> Variant ((* ': x) xs) -> Variant ((* ': x) xs) #

Ord (Variant ([] *)) Source # 

Methods

compare :: Variant [*] -> Variant [*] -> Ordering #

(<) :: Variant [*] -> Variant [*] -> Bool #

(<=) :: Variant [*] -> Variant [*] -> Bool #

(>) :: Variant [*] -> Variant [*] -> Bool #

(>=) :: Variant [*] -> Variant [*] -> Bool #

max :: Variant [*] -> Variant [*] -> Variant [*] #

min :: Variant [*] -> Variant [*] -> Variant [*] #

(Show (Variant xs), Show x) => Show (Variant ((:) * x xs)) Source # 

Methods

showsPrec :: Int -> Variant ((* ': x) xs) -> ShowS #

show :: Variant ((* ': x) xs) -> String #

showList :: [Variant ((* ': x) xs)] -> ShowS #

Show (Variant ([] *)) Source # 

Methods

showsPrec :: Int -> Variant [*] -> ShowS #

show :: Variant [*] -> String #

showList :: [Variant [*]] -> ShowS #

variantIndex :: Variant a -> Word Source #

Make GHC consider l as a representational parameter to make coercions between Variant values unsafe

Get Variant index

getVariantN :: forall n l. KnownNat n => Variant l -> Maybe (Index n l) Source #

Get the value if it has the indexed type

setVariantN :: forall n l. KnownNat n => Index n l -> Variant l Source #

Set the value with the given indexed type

updateVariantN :: forall n a b l. (KnownNat n, a ~ Index n l) => (a -> b) -> Variant l -> Variant (ReplaceN n b l) Source #

Update a variant value

setVariant :: forall a l. Member a l => a -> Variant l Source #

Set the first matching type of a Variant

getVariant :: forall a l. Member a l => Variant l -> Maybe a Source #

Set the first matching type of a Variant

updateVariant :: forall a b n l. (Member a l, n ~ IndexOf a l) => (a -> b) -> Variant l -> Variant (ReplaceN n b l) Source #

Update a variant value

updateVariantM :: forall n l l2 m. (KnownNat n, Monad m) => (Index n l -> m (Index n l2)) -> Variant l -> m (Variant l2) Source #

Update a variant value in a Monad

updateVariantFold :: forall a n l l2. (KnownNat n, KnownNat (Length l2), n ~ IndexOf a l, a ~ Index n l) => (a -> Variant l2) -> Variant l -> Variant (ReplaceAt n l l2) Source #

Update a variant value with a variant and fold the result

updateVariantFoldN :: forall n l l2. (KnownNat n, KnownNat (Length l2)) => (Index n l -> Variant l2) -> Variant l -> Variant (ReplaceAt n l l2) Source #

Update a variant value with a variant and fold the result

updateVariantFoldM :: forall n m l l2. (KnownNat n, KnownNat (Length l2), Monad m) => (Index n l -> m (Variant l2)) -> Variant l -> m (Variant (ReplaceAt n l l2)) Source #

Update a variant value with a variant and fold the result

variantToHList :: VariantToHList xs => Variant xs -> HList (MapMaybe xs) Source #

Convert a variant into a HList of Maybes

variantToTuple :: forall l t. (VariantToHList l, HTuple' (MapMaybe l) t) => Variant l -> t Source #

Get variant possible values in a tuple of Maybe types

liftEither :: Either a b -> Variant '[b, a] Source #

Lift an Either into a Variant (reversed order by convention)

liftEitherM :: Monad m => m (Either a b) -> m (Variant '[b, a]) Source #

Lift an Either into a Variant (reversed order by convention)

variantRemoveType :: VariantRemoveType a xs => Variant xs -> Either (Variant (Filter a xs)) a Source #

Remove a type from a variant

type Member x xs = (IsMember x xs ~ True, x ~ Index (IndexOf x xs) xs, KnownNat (IndexOf x xs)) Source #

Constraint: x member of xs

type Catchable a xs = (IsMember a xs ~ True, VariantRemoveType a xs) Source #

a is catchable in xs

type MaybeCatchable a xs = VariantRemoveType a xs Source #

a may be catchable in xs

type Liftable xs ys = (IsSubset xs ys ~ True, VariantLift xs ys) Source #

xs is liftable in ys

catchVariant :: forall a xs. Catchable a xs => Variant xs -> Either (Variant (Filter a xs)) a Source #

Extract a type from a variant. Return either the value of this type or the remaining variant

catchVariantMaybe :: forall a xs. MaybeCatchable a xs => Variant xs -> Either (Variant (Filter a xs)) a Source #

Extract a type from a variant. Return either the value of this type or the remaining variant

pickVariant :: forall n l. KnownNat n => Variant l -> Either (Variant (RemoveAt n l)) (Index n l) Source #

Pick a variant value

headVariant :: forall x xs. Variant (x ': xs) -> Either (Variant xs) x Source #

Pick the head of a variant value

singleVariant :: Variant '[a] -> a Source #

Retreive the last v

appendVariant :: forall ys xs. Variant xs -> Variant (Concat xs ys) Source #

Extend a variant by appending other possible values

prependVariant :: forall ys xs. KnownNat (Length ys) => Variant xs -> Variant (Concat ys xs) Source #

Extend a variant by prepending other possible values

liftVariant :: forall xs ys. Liftable xs ys => Variant xs -> Variant ys Source #

Lift a variant into another

Set values to the first matching type

liftVariantM :: (Liftable xs ys, Monad m) => Variant xs -> m (Variant ys) Source #

toEither :: forall a b. Variant '[a, b] -> Either b a Source #

Convert a variant of two values in a Either

class ContVariant xs where Source #

Methods

variantToCont :: Variant xs -> ContFlow xs r Source #

Convert a variant into a multi-continuation

variantToContM :: Monad m => m (Variant xs) -> ContFlow xs (m r) Source #

Convert a variant into a multi-continuation

contToVariant :: ContFlow xs (Variant xs) -> Variant xs Source #

Convert a multi-continuation into a Variant

contToVariantM :: Monad m => ContFlow xs (m (Variant xs)) -> m (Variant xs) Source #

Convert a multi-continuation into a Variant

Instances

ContVariant ((:) * a ((:) * b ((:) * c ((:) * d ((:) * e ((:) * f ((:) * g ((:) * h ((:) * i ((:) * j ((:) * k ((:) * l ([] *))))))))))))) Source # 

Methods

variantToCont :: Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) ((* ': l) [*])))))))))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) ((* ': l) [*])))))))))))) r Source #

variantToContM :: Monad m => m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) ((* ': l) [*]))))))))))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) ((* ': l) [*])))))))))))) (m r) Source #

contToVariant :: ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) ((* ': l) [*])))))))))))) (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) ((* ': l) [*]))))))))))))) -> Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) ((* ': l) [*])))))))))))) Source #

contToVariantM :: Monad m => ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) ((* ': l) [*])))))))))))) (m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) ((* ': l) [*])))))))))))))) -> m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) ((* ': l) [*]))))))))))))) Source #

ContVariant ((:) * a ((:) * b ((:) * c ((:) * d ((:) * e ((:) * f ((:) * g ((:) * h ((:) * i ((:) * j ((:) * k ([] *)))))))))))) Source # 

Methods

variantToCont :: Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) [*]))))))))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) [*]))))))))))) r Source #

variantToContM :: Monad m => m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) [*])))))))))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) [*]))))))))))) (m r) Source #

contToVariant :: ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) [*]))))))))))) (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) [*])))))))))))) -> Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) [*]))))))))))) Source #

contToVariantM :: Monad m => ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) [*]))))))))))) (m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) [*]))))))))))))) -> m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) ((* ': k) [*])))))))))))) Source #

ContVariant ((:) * a ((:) * b ((:) * c ((:) * d ((:) * e ((:) * f ((:) * g ((:) * h ((:) * i ((:) * j ([] *))))))))))) Source # 

Methods

variantToCont :: Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) [*])))))))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) [*])))))))))) r Source #

variantToContM :: Monad m => m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) [*]))))))))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) [*])))))))))) (m r) Source #

contToVariant :: ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) [*])))))))))) (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) [*]))))))))))) -> Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) [*])))))))))) Source #

contToVariantM :: Monad m => ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) [*])))))))))) (m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) [*])))))))))))) -> m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) ((* ': j) [*]))))))))))) Source #

ContVariant ((:) * a ((:) * b ((:) * c ((:) * d ((:) * e ((:) * f ((:) * g ((:) * h ((:) * i ([] *)))))))))) Source # 

Methods

variantToCont :: Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) [*]))))))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) [*]))))))))) r Source #

variantToContM :: Monad m => m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) [*])))))))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) [*]))))))))) (m r) Source #

contToVariant :: ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) [*]))))))))) (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) [*])))))))))) -> Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) [*]))))))))) Source #

contToVariantM :: Monad m => ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) [*]))))))))) (m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) [*]))))))))))) -> m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) ((* ': i) [*])))))))))) Source #

ContVariant ((:) * a ((:) * b ((:) * c ((:) * d ((:) * e ((:) * f ((:) * g ((:) * h ([] *))))))))) Source # 

Methods

variantToCont :: Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) [*])))))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) [*])))))))) r Source #

variantToContM :: Monad m => m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) [*]))))))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) [*])))))))) (m r) Source #

contToVariant :: ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) [*])))))))) (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) [*]))))))))) -> Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) [*])))))))) Source #

contToVariantM :: Monad m => ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) [*])))))))) (m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) [*])))))))))) -> m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) ((* ': h) [*]))))))))) Source #

ContVariant ((:) * a ((:) * b ((:) * c ((:) * d ((:) * e ((:) * f ((:) * g ([] *)))))))) Source # 

Methods

variantToCont :: Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) [*]))))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) [*]))))))) r Source #

variantToContM :: Monad m => m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) [*])))))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) [*]))))))) (m r) Source #

contToVariant :: ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) [*]))))))) (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) [*])))))))) -> Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) [*]))))))) Source #

contToVariantM :: Monad m => ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) [*]))))))) (m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) [*]))))))))) -> m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) ((* ': g) [*])))))))) Source #

ContVariant ((:) * a ((:) * b ((:) * c ((:) * d ((:) * e ((:) * f ([] *))))))) Source # 

Methods

variantToCont :: Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) [*])))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) [*])))))) r Source #

variantToContM :: Monad m => m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) [*]))))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) [*])))))) (m r) Source #

contToVariant :: ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) [*])))))) (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) [*]))))))) -> Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) [*])))))) Source #

contToVariantM :: Monad m => ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) [*])))))) (m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) [*])))))))) -> m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) ((* ': f) [*]))))))) Source #

ContVariant ((:) * a ((:) * b ((:) * c ((:) * d ((:) * e ([] *)))))) Source # 

Methods

variantToCont :: Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) [*]))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) [*]))))) r Source #

variantToContM :: Monad m => m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) [*])))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) [*]))))) (m r) Source #

contToVariant :: ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) [*]))))) (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) [*])))))) -> Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) [*]))))) Source #

contToVariantM :: Monad m => ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) [*]))))) (m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) [*]))))))) -> m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) ((* ': e) [*])))))) Source #

ContVariant ((:) * a ((:) * b ((:) * c ((:) * d ([] *))))) Source # 

Methods

variantToCont :: Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) [*])))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) [*])))) r Source #

variantToContM :: Monad m => m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) [*]))))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) [*])))) (m r) Source #

contToVariant :: ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) [*])))) (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) [*]))))) -> Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) [*])))) Source #

contToVariantM :: Monad m => ContFlow ((* ': a) ((* ': b) ((* ': c) ((* ': d) [*])))) (m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) [*])))))) -> m (Variant ((* ': a) ((* ': b) ((* ': c) ((* ': d) [*]))))) Source #

ContVariant ((:) * a ((:) * b ((:) * c ([] *)))) Source # 

Methods

variantToCont :: Variant ((* ': a) ((* ': b) ((* ': c) [*]))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) [*]))) r Source #

variantToContM :: Monad m => m (Variant ((* ': a) ((* ': b) ((* ': c) [*])))) -> ContFlow ((* ': a) ((* ': b) ((* ': c) [*]))) (m r) Source #

contToVariant :: ContFlow ((* ': a) ((* ': b) ((* ': c) [*]))) (Variant ((* ': a) ((* ': b) ((* ': c) [*])))) -> Variant ((* ': a) ((* ': b) ((* ': c) [*]))) Source #

contToVariantM :: Monad m => ContFlow ((* ': a) ((* ': b) ((* ': c) [*]))) (m (Variant ((* ': a) ((* ': b) ((* ': c) [*]))))) -> m (Variant ((* ': a) ((* ': b) ((* ': c) [*])))) Source #

ContVariant ((:) * a ((:) * b ([] *))) Source # 

Methods

variantToCont :: Variant ((* ': a) ((* ': b) [*])) -> ContFlow ((* ': a) ((* ': b) [*])) r Source #

variantToContM :: Monad m => m (Variant ((* ': a) ((* ': b) [*]))) -> ContFlow ((* ': a) ((* ': b) [*])) (m r) Source #

contToVariant :: ContFlow ((* ': a) ((* ': b) [*])) (Variant ((* ': a) ((* ': b) [*]))) -> Variant ((* ': a) ((* ': b) [*])) Source #

contToVariantM :: Monad m => ContFlow ((* ': a) ((* ': b) [*])) (m (Variant ((* ': a) ((* ': b) [*])))) -> m (Variant ((* ': a) ((* ': b) [*]))) Source #

ContVariant ((:) * a ([] *)) Source # 

Methods

variantToCont :: Variant ((* ': a) [*]) -> ContFlow ((* ': a) [*]) r Source #

variantToContM :: Monad m => m (Variant ((* ': a) [*])) -> ContFlow ((* ': a) [*]) (m r) Source #

contToVariant :: ContFlow ((* ': a) [*]) (Variant ((* ': a) [*])) -> Variant ((* ': a) [*]) Source #

contToVariantM :: Monad m => ContFlow ((* ': a) [*]) (m (Variant ((* ': a) [*]))) -> m (Variant ((* ': a) [*])) Source #