class Member (sub :: (Type -> Type) -> Type -> Type) (sup :: (Type -> Type) -> Type -> Type) whereThe class of types present in a signature.
This is based on Wouter Swierstra’s design described in Data types à la carte. As described therein, overlapping instances are required in order to distinguish e.g. left-occurrence from right-recursion.
It should not generally be necessary for you to define new Member instances, but these are not specifically prohibited if you wish to get creative.
Methods
inj :: sub m a -> sup m aInject a member of a signature into the signature.
Instances4Member
Member t tDefined in fused-effects-1.1.2.7 · Control.Effect.SumReflexivity:
tis a member of itself.Member l (l :+: r)Defined in fused-effects-1.1.2.7 · Control.Effect.SumLeft-occurrence: if
tis at the head of a signature, we can inject it in O(1).Member l r => Member l (l' :+: r)Defined in fused-effects-1.1.2.7 · Control.Effect.SumRight-recursion: if
tis a member ofr, we can inject it intorin O(n), followed by lifting that intol :+: rin O(1).Member t (l1 :+: (l2 :+: r)) => Member t ((l1 :+: l2) :+: r)Defined in fused-effects-1.1.2.7 · Control.Effect.Sum