servant-client-core-0.20.2: 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) #

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

#### Instances

Instances details

GenericMode (AsClientT m :: Type) # |
Instance details Defined in Servant.Client.Core.HasClient
type (AsClientT m :: Type) :- api # |
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) #

Generate a record of client functions.

genericClientHoist #

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.