servant-server-namedargs-0.1.0.0: Automatically derive API server functions with named and optional parameters

Safe HaskellNone
LanguageHaskell2010

Servant.Server.NamedArgs

Contents

Description

Provides instances to be able to use combinators from Servant.API.NamedArgs with Servant.Client, returning functions using named parameters from Named

Orphan instances

(KnownSymbol name, FromHttpApiData a, HasServer api context) => HasServer (NamedCapture' mods name a :> api :: Type) context Source #

NamedCapture's are converted to required named arguments

Instance details

Associated Types

type ServerT (NamedCapture' mods name a :> api) m :: Type #

Methods

route :: Proxy (NamedCapture' mods name a :> api) -> Context context -> Delayed env (Server (NamedCapture' mods name a :> api)) -> Router env #

hoistServerWithContext :: Proxy (NamedCapture' mods name a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (NamedCapture' mods name a :> api) m -> ServerT (NamedCapture' mods name a :> api) n #

(KnownSymbol name, FromHttpApiData a, HasServer api context) => HasServer (NamedCaptureAll name a :> api :: Type) context Source #

NamedCaptureAlls are converted to required named arguments, taking a list

Instance details

Associated Types

type ServerT (NamedCaptureAll name a :> api) m :: Type #

Methods

route :: Proxy (NamedCaptureAll name a :> api) -> Context context -> Delayed env (Server (NamedCaptureAll name a :> api)) -> Router env #

hoistServerWithContext :: Proxy (NamedCaptureAll name a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (NamedCaptureAll name a :> api) m -> ServerT (NamedCaptureAll name a :> api) n #

(KnownSymbol name, FromHttpApiData a, HasServer api context, SBoolI (FoldRequired mods), SBoolI (FoldLenient mods)) => HasServer (NamedParam mods name a :> api :: Type) context Source #

NamedParams are converted to required or optional named arguments depending on the Required and Optional modifiers, of type a or Either Text a depending on the Strict and Lenient modifiers

Instance details

Associated Types

type ServerT (NamedParam mods name a :> api) m :: Type #

Methods

route :: Proxy (NamedParam mods name a :> api) -> Context context -> Delayed env (Server (NamedParam mods name a :> api)) -> Router env #

hoistServerWithContext :: Proxy (NamedParam mods name a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (NamedParam mods name a :> api) m -> ServerT (NamedParam mods name a :> api) n #

(KnownSymbol name, FromHttpApiData a, HasServer api context) => HasServer (NamedParams name a :> api :: Type) context Source #

NamedParamss are converted to required named arguments, taking a list

Instance details

Associated Types

type ServerT (NamedParams name a :> api) m :: Type #

Methods

route :: Proxy (NamedParams name a :> api) -> Context context -> Delayed env (Server (NamedParams name a :> api)) -> Router env #

hoistServerWithContext :: Proxy (NamedParams name a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (NamedParams name a :> api) m -> ServerT (NamedParams name a :> api) n #

(KnownSymbol name, HasServer api context) => HasServer (NamedFlag name :> api :: Type) context Source #

NamedFlags are converted to required named arguments

Instance details

Associated Types

type ServerT (NamedFlag name :> api) m :: Type #

Methods

route :: Proxy (NamedFlag name :> api) -> Context context -> Delayed env (Server (NamedFlag name :> api)) -> Router env #

hoistServerWithContext :: Proxy (NamedFlag name :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (NamedFlag name :> api) m -> ServerT (NamedFlag name :> api) n #

(KnownSymbol name, FromHttpApiData a, HasServer api context, SBoolI (FoldRequired mods), SBoolI (FoldLenient mods)) => HasServer (NamedHeader' mods name a :> api :: Type) context Source #

NamedHeader's are converted to required or optional named arguments depending on the Required and Optional modifiers, of type a or Either Text a depending on the Strict and Lenient modifiers

Instance details

Associated Types

type ServerT (NamedHeader' mods name a :> api) m :: Type #

Methods

route :: Proxy (NamedHeader' mods name a :> api) -> Context context -> Delayed env (Server (NamedHeader' mods name a :> api)) -> Router env #

hoistServerWithContext :: Proxy (NamedHeader' mods name a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (NamedHeader' mods name a :> api) m -> ServerT (NamedHeader' mods name a :> api) n #