Safe Haskell | None |
---|---|
Language | GHC2021 |
Polysemy.Http.Interpreter.AesonEntity
Description
Synopsis
- interpretEntityEncodeAesonAs :: forall j d (r :: [(Type -> Type) -> Type -> Type]) a. ToJSON j => (d -> j) -> Sem (EntityEncode d ': r) a -> Sem r a
- interpretEntityEncodeAeson :: forall d (r :: [(Type -> Type) -> Type -> Type]) a. ToJSON d => Sem (EntityEncode d ': r) a -> Sem r a
- interpretEntityDecodeAesonWith :: forall j (r :: EffectRow) d a. FromJSON j => (j -> Sem r (Either Text d)) -> Sem (EntityDecode d ': r) a -> Sem r a
- interpretEntityDecodeAesonAs :: forall j d (r :: [(Type -> Type) -> Type -> Type]) a. FromJSON j => (j -> d) -> Sem (EntityDecode d ': r) a -> Sem r a
- interpretEntityDecodeAeson :: forall d (r :: [(Type -> Type) -> Type -> Type]) a. FromJSON d => Sem (EntityDecode d ': r) a -> Sem r a
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.