servant-client-core-0.20.3.0: Core functionality and class for client function generation for servant APIs

Safe Haskell | None
Language | Haskell2010

Servant.Client.Generic

Synopsis

- data AsClientT (m :: Type -> Type)
- genericClient :: forall routes (m :: Type -> Type). (HasClient m (ToServantApi routes), GenericServant routes (AsClientT m), Client m (ToServantApi routes) ~ ToServant routes (AsClientT m)) => routes (AsClientT m)
- genericClientHoist :: forall routes m n. (HasClient m (ToServantApi routes), GenericServant routes (AsClientT n), Client n (ToServantApi routes) ~ ToServant routes (AsClientT n)) => (forall x. m x -> n x) -> routes (AsClientT n)

# Documentation

data AsClientT (m :: Type -> Type) Source #

A type that specifies that an API record contains a client implementation.

#### Instances

Instances details

GenericMode (AsClientT m :: Type) Source # |
Instance details Defined in Servant.Client.Core.HasClient
type (AsClientT m :: Type) :- api Source # |
Instance details Defined in Servant.Client.Core.HasClient type (AsClientT m :: Type) :- api = Client m api

genericClient :: forall routes (m :: Type -> Type). (HasClient m (ToServantApi routes), GenericServant routes (AsClientT m), Client m (ToServantApi routes) ~ ToServant routes (AsClientT m)) => routes (AsClientT m) Source #

Generate a record of client functions.

genericClientHoist Source #

Arguments

:: forall routes m n. (HasClient m (ToServantApi routes), GenericServant routes (AsClientT n), Client n (ToServantApi routes) ~ ToServant routes (AsClientT n)) |
=> (forall x. m x -> n x) | natural transformation
-> routes (AsClientT n) |

`genericClient` but with `hoistClientMonad` in between.