chiasma-0.10.1.0: A tmux client for Polysemy
Safe HaskellSafe-Inferred
LanguageGHC2021

Chiasma.Effect.Codec

Documentation

data Codec (command :: Type -> Type) (i :: Type) (o :: Type) :: Effect where Source #

Constructors

WithCodec :: command a -> (i -> m o) -> Codec command i o m a 
Encode :: command a -> Codec command i o m i 

encode :: forall command i o r a. Member (Codec command i o) r => command a -> Sem r i Source #

withCodec :: forall command i o r a. Member (Codec command i o) r => command a -> (i -> Sem r o) -> Sem r a Source #

type NativeCodecE command = NativeCodec command !! CodecError Source #

type family NativeCodecs (cs :: [Type -> Type]) :: [Effect] where ... Source #

Equations

NativeCodecs '[] = '[] 
NativeCodecs (c : cs) = NativeCodec c : NativeCodecs cs 

type family NativeCodecsE (cs :: [Type -> Type]) :: [Effect] where ... Source #

Equations

NativeCodecsE '[] = '[] 
NativeCodecsE (c : cs) = NativeCodecE c : NativeCodecsE cs