polysemy-http-0.13.1.0: Polysemy effects for HTTP clients
Safe HaskellNone
LanguageGHC2021

Polysemy.Http.Interpreter.AesonEntity

Description

 
Synopsis

Documentation

interpretEntityEncodeAesonAs :: forall j d (r :: [(Type -> Type) -> Type -> Type]) a. ToJSON j => (d -> j) -> Sem (EntityEncode d ': r) a -> Sem r a Source #

Interpreter for EntityEncode that uses Aeson and a different codec type. The first parameter is the conversion function.

interpretEntityEncodeAeson :: forall d (r :: [(Type -> Type) -> Type -> Type]) a. ToJSON d => Sem (EntityEncode d ': r) a -> Sem r a Source #

Interpreter for EntityEncode that uses Aeson.

interpretEntityDecodeAesonWith :: forall j (r :: EffectRow) d a. FromJSON j => (j -> Sem r (Either Text d)) -> Sem (EntityDecode d ': r) a -> Sem r a Source #

Interpreter for EntityDecode that uses Aeson and a different codec type. The first parameter is the effectful conversion function.

interpretEntityDecodeAesonAs :: forall j d (r :: [(Type -> Type) -> Type -> Type]) a. FromJSON j => (j -> d) -> Sem (EntityDecode d ': r) a -> Sem r a Source #

Interpreter for EntityDecode that uses Aeson and a different codec type. The first parameter is the conversion function.

interpretEntityDecodeAeson :: forall d (r :: [(Type -> Type) -> Type -> Type]) a. FromJSON d => Sem (EntityDecode d ': r) a -> Sem r a Source #

Interpreter for EntityDecode that uses Aeson.