servant-foreign-0.16.1: Helpers for generating clients for servant APIs in any programming language
Safe HaskellNone
LanguageHaskell2010

Servant.Foreign

Description

Generalizes all the data needed to make code generation work with arbitrary programming languages.

See documentation of HasForeignType for a simple example. listFromAPI returns a list of all your endpoints and their foreign types, given a mapping from Haskell types to foreign types (conventionally called ftypes below).

Synopsis

Main API

listFromAPI :: forall {k} (lang :: k) ftype api. (HasForeign lang ftype api, GenerateList ftype (Foreign ftype api)) => Proxy lang -> Proxy ftype -> Proxy api -> [Req ftype] Source #

Generate the necessary data for codegen as a list, each Req describing one endpoint from your API type.

data Req ftype Source #

Full description of an endpoint in your API, generated by listFromAPI. It should give you all the information needed to generate foreign language bindings.

Every field containing ftype will use the foreign type mapping specified via HasForeignType (see its docstring on how to set that up).

See https://docs.servant.dev/en/stable/tutorial/ApiType.html for accessible documentation of the possible content of an endpoint.

Constructors

Req 

Fields

  • _reqUrl :: Url ftype

    Full list of URL segments, including captures

  • _reqMethod :: Method

    "GET"/"POST"/"PUT"/…

  • _reqHeaders :: [HeaderArg ftype]

    Headers required by this endpoint, with their type

  • _reqBody :: Maybe ftype

    Foreign type of the expected request body (ReqBody), if any

  • _reqReturnType :: Maybe ftype

    The foreign type of the response, if any

  • _reqFuncName :: FunctionName

    The URL segments rendered in a way that they can be easily concatenated into a canonical function name

  • _reqBodyContentType :: ReqBodyContentType

    The content type the request body is transferred as.

    This is a severe limitation of servant-foreign currently, as we only allow the content type to be JSON no user-defined content types. (ReqBodyMultipart is not actually implemented.)

    Thus, any routes looking like this will work:

    "foo" :> Get '[JSON] Foo

    while routes like

    "foo" :> Get '[MyFancyContentType] Foo

    will fail with an error like

    • JSON expected in list '[MyFancyContentType]

Instances

Instances details
GenerateList ftype (Req ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

generateList :: Req ftype -> [Req ftype] Source #

Data ftype => Data (Req ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Req ftype -> c (Req ftype)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Req ftype)

toConstr :: Req ftype -> Constr

dataTypeOf :: Req ftype -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Req ftype))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Req ftype))

gmapT :: (forall b. Data b => b -> b) -> Req ftype -> Req ftype

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Req ftype -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Req ftype -> r

gmapQ :: (forall d. Data d => d -> u) -> Req ftype -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> Req ftype -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Req ftype -> m (Req ftype)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Req ftype -> m (Req ftype)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Req ftype -> m (Req ftype)

Show ftype => Show (Req ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

showsPrec :: Int -> Req ftype -> ShowS

show :: Req ftype -> String

showList :: [Req ftype] -> ShowS

Eq ftype => Eq (Req ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

(==) :: Req ftype -> Req ftype -> Bool

(/=) :: Req ftype -> Req ftype -> Bool

defReq :: Req ftype Source #

class HasForeignType (lang :: k) ftype (a :: k1) where Source #

HasForeignType maps Haskell types with types in the target language of your backend. For example, let's say you're implementing a backend to some language X, and you want a Text representation of each input/output type mentioned in the API:

-- First you need to create a dummy type to parametrize your
-- instances.
data LangX

-- Otherwise you define instances for the types you need
instance HasForeignType LangX Text Int where
   typeFor _ _ _ = "intX"

-- Or for example in case of lists
instance HasForeignType LangX Text a => HasForeignType LangX Text [a] where
   typeFor lang ftype _ = "listX of " <> typeFor lang ftype (Proxy :: Proxy a)

Finally to generate list of information about all the endpoints for an API you create a function of a form:

getEndpoints :: (HasForeign LangX Text api, GenerateList Text (Foreign Text api))
             => Proxy api -> [Req Text]
getEndpoints api = listFromAPI (Proxy :: Proxy LangX) (Proxy :: Proxy Text) api
-- If language __X__ is dynamically typed then you can use
-- a predefined NoTypes parameter with the NoContent output type:
getEndpoints :: (HasForeign NoTypes NoContent api, GenerateList Text (Foreign NoContent api))
             => Proxy api -> [Req NoContent]
getEndpoints api = listFromAPI (Proxy :: Proxy NoTypes) (Proxy :: Proxy NoContent) api

Methods

typeFor :: Proxy lang -> Proxy ftype -> Proxy a -> ftype Source #

Instances

Instances details
HasForeignType NoTypes NoContent (a :: k) Source #

Use if the foreign language does not have any types.

Instance details

Defined in Servant.Foreign.Internal

Methods

typeFor :: Proxy NoTypes -> Proxy NoContent -> Proxy a -> NoContent Source #

class GenerateList ftype reqs where Source #

Utility class used by listFromAPI which computes the data needed to generate a function for each endpoint and hands it all back in a list.

Methods

generateList :: reqs -> [Req ftype] Source #

Instances

Instances details
GenerateList ftype EmptyForeignAPI Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

generateList :: EmptyForeignAPI -> [Req ftype] Source #

GenerateList ftype (Req ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

generateList :: Req ftype -> [Req ftype] Source #

(GenerateList ftype start, GenerateList ftype rest) => GenerateList ftype (start :<|> rest) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

generateList :: (start :<|> rest) -> [Req ftype] Source #

class HasForeign (lang :: k) ftype api where Source #

Implementation of the Servant framework types.

Relevant instances: Everything containing HasForeignType.

Associated Types

type Foreign ftype api Source #

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy api -> Req ftype -> Foreign ftype api Source #

Instances

Instances details
HasForeign (lang :: k) ftype EmptyAPI Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype EmptyAPI 
Instance details

Defined in Servant.Foreign.Internal

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy EmptyAPI -> Req ftype -> Foreign ftype EmptyAPI Source #

HasForeign (lang :: k) ftype Raw Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype Raw 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype Raw = Method -> Req ftype

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy Raw -> Req ftype -> Foreign ftype Raw Source #

HasForeign lang ftype (ToServantApi r) => HasForeign (lang :: k) ftype (NamedRoutes r) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (NamedRoutes r) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (NamedRoutes r) = Foreign ftype (ToServantApi r)

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (NamedRoutes r) -> Req ftype -> Foreign ftype (NamedRoutes r) Source #

(HasForeign lang ftype a, HasForeign lang ftype b) => HasForeign (lang :: k) ftype (a :<|> b) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (a :<|> b) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (a :<|> b) = Foreign ftype a :<|> Foreign ftype b

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (a :<|> b) -> Req ftype -> Foreign ftype (a :<|> b) Source #

(HasForeignType lang ftype NoContent, ReflectMethod method) => HasForeign (lang :: k) ftype (NoContentVerb method) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (NoContentVerb method) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (NoContentVerb method) = Req ftype

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (NoContentVerb method) -> Req ftype -> Foreign ftype (NoContentVerb method) Source #

(KnownSymbol path, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (path :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (path :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (path :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (path :> api) -> Req ftype -> Foreign ftype (path :> api) Source #

HasForeign lang ftype api => HasForeign (lang :: k) ftype (HttpVersion :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (HttpVersion :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (HttpVersion :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (HttpVersion :> api) -> Req ftype -> Foreign ftype (HttpVersion :> api) Source #

(KnownSymbol sym, HasForeignType lang ftype t, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Capture' mods sym t :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Capture' mods sym t :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Capture' mods sym t :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Capture' mods sym t :> api) -> Req ftype -> Foreign ftype (Capture' mods sym t :> api) Source #

(KnownSymbol sym, HasForeignType lang ftype [t], HasForeign lang ftype sublayout) => HasForeign (lang :: k) ftype (CaptureAll sym t :> sublayout) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (CaptureAll sym t :> sublayout) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (CaptureAll sym t :> sublayout) = Foreign ftype sublayout

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (CaptureAll sym t :> sublayout) -> Req ftype -> Foreign ftype (CaptureAll sym t :> sublayout) Source #

HasForeign lang ftype api => HasForeign (lang :: k) ftype (Description desc :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Description desc :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Description desc :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Description desc :> api) -> Req ftype -> Foreign ftype (Description desc :> api) Source #

HasForeign lang ftype api => HasForeign (lang :: k) ftype (Summary desc :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Summary desc :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Summary desc :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Summary desc :> api) -> Req ftype -> Foreign ftype (Summary desc :> api) Source #

(HasForeignType lang ftype (Maybe a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Fragment a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Fragment a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Fragment a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Fragment a :> api) -> Req ftype -> Foreign ftype (Fragment a :> api) Source #

(KnownSymbol sym, HasForeignType lang ftype (RequiredArgument mods a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Header' mods sym a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Header' mods sym a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Header' mods sym a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Header' mods sym a :> api) -> Req ftype -> Foreign ftype (Header' mods sym a :> api) Source #

HasForeign lang ftype api => HasForeign (lang :: k) ftype (IsSecure :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (IsSecure :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (IsSecure :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (IsSecure :> api) -> Req ftype -> Foreign ftype (IsSecure :> api) Source #

(KnownSymbol sym, HasForeignType lang ftype Bool, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryFlag sym :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (QueryFlag sym :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (QueryFlag sym :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (QueryFlag sym :> api) -> Req ftype -> Foreign ftype (QueryFlag sym :> api) Source #

(KnownSymbol sym, HasForeignType lang ftype (RequiredArgument mods a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryParam' mods sym a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (QueryParam' mods sym a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (QueryParam' mods sym a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (QueryParam' mods sym a :> api) -> Req ftype -> Foreign ftype (QueryParam' mods sym a :> api) Source #

(KnownSymbol sym, HasForeignType lang ftype [a], HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryParams sym a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (QueryParams sym a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (QueryParams sym a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (QueryParams sym a :> api) -> Req ftype -> Foreign ftype (QueryParams sym a :> api) Source #

HasForeign lang ftype api => HasForeign (lang :: k) ftype (RemoteHost :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (RemoteHost :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (RemoteHost :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (RemoteHost :> api) -> Req ftype -> Foreign ftype (RemoteHost :> api) Source #

(Elem JSON list, HasForeignType lang ftype a, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (ReqBody' mods list a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (ReqBody' mods list a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (ReqBody' mods list a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (ReqBody' mods list a :> api) -> Req ftype -> Foreign ftype (ReqBody' mods list a :> api) Source #

HasForeign lang ftype api => HasForeign (lang :: k) ftype (StreamBody' mods framing ctype a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (StreamBody' mods framing ctype a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (StreamBody' mods framing ctype a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (StreamBody' mods framing ctype a :> api) -> Req ftype -> Foreign ftype (StreamBody' mods framing ctype a :> api) Source #

HasForeign lang ftype api => HasForeign (lang :: k) ftype (Vault :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Vault :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Vault :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Vault :> api) -> Req ftype -> Foreign ftype (Vault :> api) Source #

HasForeign lang ftype api => HasForeign (lang :: k1) ftype (WithResource res :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (WithResource res :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (WithResource res :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (WithResource res :> api) -> Req ftype -> Foreign ftype (WithResource res :> api) Source #

HasForeign lang ftype api => HasForeign (lang :: k) ftype (WithNamedContext name context api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (WithNamedContext name context api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (WithNamedContext name context api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (WithNamedContext name context api) -> Req ftype -> Foreign ftype (WithNamedContext name context api) Source #

(Elem JSON list, HasForeignType lang ftype a, ReflectMethod method) => HasForeign (lang :: k) ftype (Verb method status list a) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Verb method status list a) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Verb method status list a) = Req ftype

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Verb method status list a) -> Req ftype -> Foreign ftype (Verb method status list a) Source #

(ct ~ JSON, HasForeignType lang ftype a, ReflectMethod method) => HasForeign (lang :: k) ftype (Stream method status framing ct a) Source #

TODO: doesn't taking framing into account.

Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Stream method status framing ct a) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Stream method status framing ct a) = Req ftype

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Stream method status framing ct a) -> Req ftype -> Foreign ftype (Stream method status framing ct a) Source #

data NoTypes Source #

The language definition without any foreign types. It can be used for dynamic languages which do not do type annotations.

Instances

Instances details
HasForeignType NoTypes NoContent (a :: k) Source #

Use if the foreign language does not have any types.

Instance details

Defined in Servant.Foreign.Internal

Methods

typeFor :: Proxy NoTypes -> Proxy NoContent -> Proxy a -> NoContent Source #

Subtypes of Req

data Url ftype Source #

Full endpoint url, with all captures and parameters

Constructors

Url 

Fields

  • _path :: Path ftype

    Url path, list of either static segments or captures

    "foo/{id}/bar"
  • _queryStr :: [QueryArg ftype]

    List of query args

    "?foo=bar&a=b"
  • _frag :: Maybe ftype

    Url fragment.

    Not sent to the HTTP server, so only useful for frontend matters (e.g. inter-page linking).

    #fragmentText

Instances

Instances details
Data ftype => Data (Url ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Url ftype -> c (Url ftype)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Url ftype)

toConstr :: Url ftype -> Constr

dataTypeOf :: Url ftype -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Url ftype))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Url ftype))

gmapT :: (forall b. Data b => b -> b) -> Url ftype -> Url ftype

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Url ftype -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Url ftype -> r

gmapQ :: (forall d. Data d => d -> u) -> Url ftype -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> Url ftype -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Url ftype -> m (Url ftype)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Url ftype -> m (Url ftype)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Url ftype -> m (Url ftype)

Show ftype => Show (Url ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

showsPrec :: Int -> Url ftype -> ShowS

show :: Url ftype -> String

showList :: [Url ftype] -> ShowS

Eq ftype => Eq (Url ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

(==) :: Url ftype -> Url ftype -> Bool

(/=) :: Url ftype -> Url ftype -> Bool

type Path ftype = [Segment ftype] Source #

newtype Segment ftype Source #

A part of the Url’s path.

Constructors

Segment 

Fields

Instances

Instances details
Data ftype => Data (Segment ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Segment ftype -> c (Segment ftype)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Segment ftype)

toConstr :: Segment ftype -> Constr

dataTypeOf :: Segment ftype -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Segment ftype))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Segment ftype))

gmapT :: (forall b. Data b => b -> b) -> Segment ftype -> Segment ftype

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Segment ftype -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Segment ftype -> r

gmapQ :: (forall d. Data d => d -> u) -> Segment ftype -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> Segment ftype -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Segment ftype -> m (Segment ftype)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Segment ftype -> m (Segment ftype)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Segment ftype -> m (Segment ftype)

Show ftype => Show (Segment ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

showsPrec :: Int -> Segment ftype -> ShowS

show :: Segment ftype -> String

showList :: [Segment ftype] -> ShowS

Eq ftype => Eq (Segment ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

(==) :: Segment ftype -> Segment ftype -> Bool

(/=) :: Segment ftype -> Segment ftype -> Bool

data SegmentType ftype Source #

Constructors

Static PathSegment

Static path segment.

"foo/bar/baz"

contains the static segments "foo", "bar" and "baz".

Cap (Arg ftype)

A capture.

"user/{userid}/name"

would capture the arg userid with type ftype.

Instances

Instances details
Data ftype => Data (SegmentType ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SegmentType ftype -> c (SegmentType ftype)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SegmentType ftype)

toConstr :: SegmentType ftype -> Constr

dataTypeOf :: SegmentType ftype -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SegmentType ftype))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SegmentType ftype))

gmapT :: (forall b. Data b => b -> b) -> SegmentType ftype -> SegmentType ftype

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SegmentType ftype -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SegmentType ftype -> r

gmapQ :: (forall d. Data d => d -> u) -> SegmentType ftype -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> SegmentType ftype -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SegmentType ftype -> m (SegmentType ftype)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SegmentType ftype -> m (SegmentType ftype)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SegmentType ftype -> m (SegmentType ftype)

Show ftype => Show (SegmentType ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

showsPrec :: Int -> SegmentType ftype -> ShowS

show :: SegmentType ftype -> String

showList :: [SegmentType ftype] -> ShowS

Eq ftype => Eq (SegmentType ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

(==) :: SegmentType ftype -> SegmentType ftype -> Bool

(/=) :: SegmentType ftype -> SegmentType ftype -> Bool

isCapture :: Segment ftype -> Bool Source #

Whether a segment is a Cap.

captureArg :: Segment ftype -> Arg ftype Source #

Crashing Arg extraction from segment, TODO: remove

data QueryArg ftype Source #

Url Query argument.

Urls can contain query arguments, which is a list of key-value pairs. In a typical url, query arguments look like this:

?foo=bar&alist[]=el1&alist[]=el2&aflag

Each pair can be

  • ?foo=bar: a plain key-val pair, either optional or required (QueryParam)
  • ?aflag: a flag (no value, implicitly Bool with default false if it’s missing) (QueryFlag)
  • ?alist[]=el1&alist[]=el2: list of values (QueryParams)

_queryArgType will be set accordingly.

For the plain key-val pairs (QueryParam), _queryArgName’s ftype will be wrapped in a Maybe if the argument is optional.

Constructors

QueryArg 

Fields

  • _queryArgName :: Arg ftype

    Name and foreign type of the argument. Will be wrapped in Maybe if the query is optional and in a `[]` if the query is a list

  • _queryArgType :: ArgType

    one of normal/plain, list or flag

Instances

Instances details
Data ftype => Data (QueryArg ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> QueryArg ftype -> c (QueryArg ftype)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (QueryArg ftype)

toConstr :: QueryArg ftype -> Constr

dataTypeOf :: QueryArg ftype -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (QueryArg ftype))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (QueryArg ftype))

gmapT :: (forall b. Data b => b -> b) -> QueryArg ftype -> QueryArg ftype

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> QueryArg ftype -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> QueryArg ftype -> r

gmapQ :: (forall d. Data d => d -> u) -> QueryArg ftype -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> QueryArg ftype -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> QueryArg ftype -> m (QueryArg ftype)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> QueryArg ftype -> m (QueryArg ftype)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> QueryArg ftype -> m (QueryArg ftype)

Show ftype => Show (QueryArg ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

showsPrec :: Int -> QueryArg ftype -> ShowS

show :: QueryArg ftype -> String

showList :: [QueryArg ftype] -> ShowS

Eq ftype => Eq (QueryArg ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

(==) :: QueryArg ftype -> QueryArg ftype -> Bool

(/=) :: QueryArg ftype -> QueryArg ftype -> Bool

data ArgType Source #

Type of a QueryArg.

Constructors

Normal 
Flag 
List 

Instances

Instances details
Data ArgType Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ArgType -> c ArgType

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ArgType

toConstr :: ArgType -> Constr

dataTypeOf :: ArgType -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ArgType)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArgType)

gmapT :: (forall b. Data b => b -> b) -> ArgType -> ArgType

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArgType -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArgType -> r

gmapQ :: (forall d. Data d => d -> u) -> ArgType -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> ArgType -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ArgType -> m ArgType

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgType -> m ArgType

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgType -> m ArgType

Show ArgType Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

showsPrec :: Int -> ArgType -> ShowS

show :: ArgType -> String

showList :: [ArgType] -> ShowS

Eq ArgType Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

(==) :: ArgType -> ArgType -> Bool

(/=) :: ArgType -> ArgType -> Bool

data HeaderArg ftype Source #

Constructors

HeaderArg

The name of the header and the foreign type of its value.

Fields

ReplaceHeaderArg

Unused, will never be set.

TODO: remove

Fields

Instances

Instances details
Data ftype => Data (HeaderArg ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HeaderArg ftype -> c (HeaderArg ftype)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HeaderArg ftype)

toConstr :: HeaderArg ftype -> Constr

dataTypeOf :: HeaderArg ftype -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HeaderArg ftype))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HeaderArg ftype))

gmapT :: (forall b. Data b => b -> b) -> HeaderArg ftype -> HeaderArg ftype

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HeaderArg ftype -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HeaderArg ftype -> r

gmapQ :: (forall d. Data d => d -> u) -> HeaderArg ftype -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> HeaderArg ftype -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HeaderArg ftype -> m (HeaderArg ftype)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HeaderArg ftype -> m (HeaderArg ftype)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HeaderArg ftype -> m (HeaderArg ftype)

Show ftype => Show (HeaderArg ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

showsPrec :: Int -> HeaderArg ftype -> ShowS

show :: HeaderArg ftype -> String

showList :: [HeaderArg ftype] -> ShowS

Eq ftype => Eq (HeaderArg ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

(==) :: HeaderArg ftype -> HeaderArg ftype -> Bool

(/=) :: HeaderArg ftype -> HeaderArg ftype -> Bool

data Arg ftype Source #

Maps a name to the foreign type that belongs to the annotated value.

Used for header args, query args, and capture args.

Constructors

Arg 

Fields

  • _argName :: PathSegment

    The name to be captured.

    Only for capture args it really denotes a path segment.

  • _argType :: ftype

    Foreign type the associated value will have

Instances

Instances details
Data ftype => Data (Arg ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Arg ftype -> c (Arg ftype)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Arg ftype)

toConstr :: Arg ftype -> Constr

dataTypeOf :: Arg ftype -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Arg ftype))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Arg ftype))

gmapT :: (forall b. Data b => b -> b) -> Arg ftype -> Arg ftype

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Arg ftype -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Arg ftype -> r

gmapQ :: (forall d. Data d => d -> u) -> Arg ftype -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> Arg ftype -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Arg ftype -> m (Arg ftype)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Arg ftype -> m (Arg ftype)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Arg ftype -> m (Arg ftype)

Show ftype => Show (Arg ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

showsPrec :: Int -> Arg ftype -> ShowS

show :: Arg ftype -> String

showList :: [Arg ftype] -> ShowS

Eq ftype => Eq (Arg ftype) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

(==) :: Arg ftype -> Arg ftype -> Bool

(/=) :: Arg ftype -> Arg ftype -> Bool

newtype FunctionName Source #

Canonical name of the endpoint, can be used to generate a function name.

You can use the functions in Servant.Foreign.Inflections, like camelCase to transform to Text.

Constructors

FunctionName 

Fields

Instances

Instances details
Data FunctionName Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FunctionName -> c FunctionName

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FunctionName

toConstr :: FunctionName -> Constr

dataTypeOf :: FunctionName -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FunctionName)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FunctionName)

gmapT :: (forall b. Data b => b -> b) -> FunctionName -> FunctionName

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FunctionName -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FunctionName -> r

gmapQ :: (forall d. Data d => d -> u) -> FunctionName -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> FunctionName -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FunctionName -> m FunctionName

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FunctionName -> m FunctionName

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FunctionName -> m FunctionName

Monoid FunctionName Source # 
Instance details

Defined in Servant.Foreign.Internal

Semigroup FunctionName Source # 
Instance details

Defined in Servant.Foreign.Internal

Show FunctionName Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

showsPrec :: Int -> FunctionName -> ShowS

show :: FunctionName -> String

showList :: [FunctionName] -> ShowS

Eq FunctionName Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

(==) :: FunctionName -> FunctionName -> Bool

(/=) :: FunctionName -> FunctionName -> Bool

data ReqBodyContentType Source #

See documentation of _reqBodyContentType

Instances

Instances details
Data ReqBodyContentType Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ReqBodyContentType -> c ReqBodyContentType

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ReqBodyContentType

toConstr :: ReqBodyContentType -> Constr

dataTypeOf :: ReqBodyContentType -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ReqBodyContentType)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ReqBodyContentType)

gmapT :: (forall b. Data b => b -> b) -> ReqBodyContentType -> ReqBodyContentType

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ReqBodyContentType -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ReqBodyContentType -> r

gmapQ :: (forall d. Data d => d -> u) -> ReqBodyContentType -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> ReqBodyContentType -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ReqBodyContentType -> m ReqBodyContentType

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ReqBodyContentType -> m ReqBodyContentType

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ReqBodyContentType -> m ReqBodyContentType

Read ReqBodyContentType Source # 
Instance details

Defined in Servant.Foreign.Internal

Show ReqBodyContentType Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

showsPrec :: Int -> ReqBodyContentType -> ShowS

show :: ReqBodyContentType -> String

showList :: [ReqBodyContentType] -> ShowS

Eq ReqBodyContentType Source # 
Instance details

Defined in Servant.Foreign.Internal

newtype PathSegment Source #

See documentation of Arg

Constructors

PathSegment 

Fields

Instances

Instances details
Data PathSegment Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PathSegment -> c PathSegment

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PathSegment

toConstr :: PathSegment -> Constr

dataTypeOf :: PathSegment -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PathSegment)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PathSegment)

gmapT :: (forall b. Data b => b -> b) -> PathSegment -> PathSegment

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PathSegment -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PathSegment -> r

gmapQ :: (forall d. Data d => d -> u) -> PathSegment -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> PathSegment -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PathSegment -> m PathSegment

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PathSegment -> m PathSegment

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PathSegment -> m PathSegment

IsString PathSegment Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

fromString :: String -> PathSegment

Monoid PathSegment Source # 
Instance details

Defined in Servant.Foreign.Internal

Semigroup PathSegment Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

(<>) :: PathSegment -> PathSegment -> PathSegment

sconcat :: NonEmpty PathSegment -> PathSegment

stimes :: Integral b => b -> PathSegment -> PathSegment

Show PathSegment Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

showsPrec :: Int -> PathSegment -> ShowS

show :: PathSegment -> String

showList :: [PathSegment] -> ShowS

Eq PathSegment Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

(==) :: PathSegment -> PathSegment -> Bool

(/=) :: PathSegment -> PathSegment -> Bool

Lenses

argName :: forall ftype f. Functor f => (PathSegment -> f PathSegment) -> Arg ftype -> f (Arg ftype) Source #

argType :: forall ftype1 ftype2 f. Functor f => (ftype1 -> f ftype2) -> Arg ftype1 -> f (Arg ftype2) Source #

argPath :: forall ftype f. (Contravariant f, Functor f) => (Text -> f Text) -> Arg ftype -> f (Arg ftype) Source #

reqUrl :: forall ftype f. Functor f => (Url ftype -> f (Url ftype)) -> Req ftype -> f (Req ftype) Source #

reqMethod :: forall ftype f. Functor f => (Method -> f Method) -> Req ftype -> f (Req ftype) Source #

reqHeaders :: forall ftype f. Functor f => ([HeaderArg ftype] -> f [HeaderArg ftype]) -> Req ftype -> f (Req ftype) Source #

reqBody :: forall ftype f. Functor f => (Maybe ftype -> f (Maybe ftype)) -> Req ftype -> f (Req ftype) Source #

reqBodyContentType :: forall ftype f. Functor f => (ReqBodyContentType -> f ReqBodyContentType) -> Req ftype -> f (Req ftype) Source #

reqReturnType :: forall ftype f. Functor f => (Maybe ftype -> f (Maybe ftype)) -> Req ftype -> f (Req ftype) Source #

reqFuncName :: forall ftype f. Functor f => (FunctionName -> f FunctionName) -> Req ftype -> f (Req ftype) Source #

path :: forall ftype f. Functor f => (Path ftype -> f (Path ftype)) -> Url ftype -> f (Url ftype) Source #

queryStr :: forall ftype f. Functor f => ([QueryArg ftype] -> f [QueryArg ftype]) -> Url ftype -> f (Url ftype) Source #

queryArgName :: forall ftype1 ftype2 f. Functor f => (Arg ftype1 -> f (Arg ftype2)) -> QueryArg ftype1 -> f (QueryArg ftype2) Source #

queryArgType :: forall ftype f. Functor f => (ArgType -> f ArgType) -> QueryArg ftype -> f (QueryArg ftype) Source #

headerArg :: forall ftype1 ftype2 f. Functor f => (Arg ftype1 -> f (Arg ftype2)) -> HeaderArg ftype1 -> f (HeaderArg ftype2) Source #

Prisms

_HeaderArg :: forall ftype p f. (Choice p, Applicative f) => p (Arg ftype) (f (Arg ftype)) -> p (HeaderArg ftype) (f (HeaderArg ftype)) Source #

_ReplaceHeaderArg :: forall ftype p f. (Choice p, Applicative f) => p (Arg ftype, Text) (f (Arg ftype, Text)) -> p (HeaderArg ftype) (f (HeaderArg ftype)) Source #

_Static :: forall ftype p f. (Choice p, Applicative f) => p PathSegment (f PathSegment) -> p (SegmentType ftype) (f (SegmentType ftype)) Source #

_Cap :: forall ftype1 ftype2 p f. (Choice p, Applicative f) => p (Arg ftype1) (f (Arg ftype2)) -> p (SegmentType ftype1) (f (SegmentType ftype2)) Source #

_Normal :: Prism' ArgType () Source #

_Flag :: Prism' ArgType () Source #

_List :: Prism' ArgType () Source #

Re-exports

data NoContent #

Constructors

NoContent 

Instances

Instances details
Generic NoContent 
Instance details

Defined in Servant.API.ContentTypes

Associated Types

type Rep NoContent 
Instance details

Defined in Servant.API.ContentTypes

type Rep NoContent = D1 ('MetaData "NoContent" "Servant.API.ContentTypes" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (C1 ('MetaCons "NoContent" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: NoContent -> Rep NoContent x

to :: Rep NoContent x -> NoContent

Read NoContent 
Instance details

Defined in Servant.API.ContentTypes

Methods

readsPrec :: Int -> ReadS NoContent

readList :: ReadS [NoContent]

readPrec :: ReadPrec NoContent

readListPrec :: ReadPrec [NoContent]

Show NoContent 
Instance details

Defined in Servant.API.ContentTypes

Methods

showsPrec :: Int -> NoContent -> ShowS

show :: NoContent -> String

showList :: [NoContent] -> ShowS

NFData NoContent 
Instance details

Defined in Servant.API.ContentTypes

Methods

rnf :: NoContent -> ()

Eq NoContent 
Instance details

Defined in Servant.API.ContentTypes

Methods

(==) :: NoContent -> NoContent -> Bool

(/=) :: NoContent -> NoContent -> Bool

HasStatus NoContent 
Instance details

Defined in Servant.API.UVerb

Associated Types

type StatusOf NoContent 
Instance details

Defined in Servant.API.UVerb

type StatusOf NoContent = 204
HasForeignType NoTypes NoContent (a :: k) Source #

Use if the foreign language does not have any types.

Instance details

Defined in Servant.Foreign.Internal

Methods

typeFor :: Proxy NoTypes -> Proxy NoContent -> Proxy a -> NoContent Source #

AllMime (ctyp ': (ctyp' ': ctyps)) => AllMimeRender (ctyp ': (ctyp' ': ctyps)) NoContent 
Instance details

Defined in Servant.API.ContentTypes

Methods

allMimeRender :: Proxy (ctyp ': (ctyp' ': ctyps)) -> NoContent -> [(MediaType, ByteString)]

Accept ctyp => AllMimeRender '[ctyp] NoContent 
Instance details

Defined in Servant.API.ContentTypes

Methods

allMimeRender :: Proxy '[ctyp] -> NoContent -> [(MediaType, ByteString)]

type Rep NoContent 
Instance details

Defined in Servant.API.ContentTypes

type Rep NoContent = D1 ('MetaData "NoContent" "Servant.API.ContentTypes" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (C1 ('MetaCons "NoContent" 'PrefixI 'False) (U1 :: Type -> Type))
type StatusOf NoContent 
Instance details

Defined in Servant.API.UVerb

type StatusOf NoContent = 204

data a :<|> b #

Constructors

a :<|> b 

Instances

Instances details
Bifoldable (:<|>) 
Instance details

Defined in Servant.API.Alternative

Methods

bifold :: Monoid m => (m :<|> m) -> m

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> (a :<|> b) -> m

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> (a :<|> b) -> c

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> (a :<|> b) -> c

Bifunctor (:<|>) 
Instance details

Defined in Servant.API.Alternative

Methods

bimap :: (a -> b) -> (c -> d) -> (a :<|> c) -> b :<|> d

first :: (a -> b) -> (a :<|> c) -> b :<|> c

second :: (b -> c) -> (a :<|> b) -> a :<|> c

Bitraversable (:<|>) 
Instance details

Defined in Servant.API.Alternative

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (a :<|> b) -> f (c :<|> d)

Biapplicative (:<|>) 
Instance details

Defined in Servant.API.Alternative

Methods

bipure :: a -> b -> a :<|> b

(<<*>>) :: ((a -> b) :<|> (c -> d)) -> (a :<|> c) -> b :<|> d

biliftA2 :: (a -> b -> c) -> (d -> e -> f) -> (a :<|> d) -> (b :<|> e) -> c :<|> f

(*>>) :: (a :<|> b) -> (c :<|> d) -> c :<|> d

(<<*) :: (a :<|> b) -> (c :<|> d) -> a :<|> b

(HasForeign lang ftype a, HasForeign lang ftype b) => HasForeign (lang :: k) ftype (a :<|> b) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (a :<|> b) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (a :<|> b) = Foreign ftype a :<|> Foreign ftype b

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (a :<|> b) -> Req ftype -> Foreign ftype (a :<|> b) Source #

(HasLink a, HasLink b) => HasLink (a :<|> b :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a0) -> Proxy (a :<|> b) -> Link -> MkLink (a :<|> b) a0 #

(GenerateList ftype start, GenerateList ftype rest) => GenerateList ftype (start :<|> rest) Source # 
Instance details

Defined in Servant.Foreign.Internal

Methods

generateList :: (start :<|> rest) -> [Req ftype] Source #

Foldable ((:<|>) a) 
Instance details

Defined in Servant.API.Alternative

Methods

fold :: Monoid m => (a :<|> m) -> m

foldMap :: Monoid m => (a0 -> m) -> (a :<|> a0) -> m

foldMap' :: Monoid m => (a0 -> m) -> (a :<|> a0) -> m

foldr :: (a0 -> b -> b) -> b -> (a :<|> a0) -> b

foldr' :: (a0 -> b -> b) -> b -> (a :<|> a0) -> b

foldl :: (b -> a0 -> b) -> b -> (a :<|> a0) -> b

foldl' :: (b -> a0 -> b) -> b -> (a :<|> a0) -> b

foldr1 :: (a0 -> a0 -> a0) -> (a :<|> a0) -> a0

foldl1 :: (a0 -> a0 -> a0) -> (a :<|> a0) -> a0

toList :: (a :<|> a0) -> [a0]

null :: (a :<|> a0) -> Bool

length :: (a :<|> a0) -> Int

elem :: Eq a0 => a0 -> (a :<|> a0) -> Bool

maximum :: Ord a0 => (a :<|> a0) -> a0

minimum :: Ord a0 => (a :<|> a0) -> a0

sum :: Num a0 => (a :<|> a0) -> a0

product :: Num a0 => (a :<|> a0) -> a0

Traversable ((:<|>) a) 
Instance details

Defined in Servant.API.Alternative

Methods

traverse :: Applicative f => (a0 -> f b) -> (a :<|> a0) -> f (a :<|> b)

sequenceA :: Applicative f => (a :<|> f a0) -> f (a :<|> a0)

mapM :: Monad m => (a0 -> m b) -> (a :<|> a0) -> m (a :<|> b)

sequence :: Monad m => (a :<|> m a0) -> m (a :<|> a0)

Functor ((:<|>) a) 
Instance details

Defined in Servant.API.Alternative

Methods

fmap :: (a0 -> b) -> (a :<|> a0) -> a :<|> b

(<$) :: a0 -> (a :<|> b) -> a :<|> a0

(Monoid a, Monoid b) => Monoid (a :<|> b) 
Instance details

Defined in Servant.API.Alternative

Methods

mempty :: a :<|> b

mappend :: (a :<|> b) -> (a :<|> b) -> a :<|> b

mconcat :: [a :<|> b] -> a :<|> b

(Semigroup a, Semigroup b) => Semigroup (a :<|> b) 
Instance details

Defined in Servant.API.Alternative

Methods

(<>) :: (a :<|> b) -> (a :<|> b) -> a :<|> b

sconcat :: NonEmpty (a :<|> b) -> a :<|> b

stimes :: Integral b0 => b0 -> (a :<|> b) -> a :<|> b

(Bounded a, Bounded b) => Bounded (a :<|> b) 
Instance details

Defined in Servant.API.Alternative

Methods

minBound :: a :<|> b

maxBound :: a :<|> b

(Show a, Show b) => Show (a :<|> b) 
Instance details

Defined in Servant.API.Alternative

Methods

showsPrec :: Int -> (a :<|> b) -> ShowS

show :: (a :<|> b) -> String

showList :: [a :<|> b] -> ShowS

(Eq a, Eq b) => Eq (a :<|> b) 
Instance details

Defined in Servant.API.Alternative

Methods

(==) :: (a :<|> b) -> (a :<|> b) -> Bool

(/=) :: (a :<|> b) -> (a :<|> b) -> Bool

type Foreign ftype (a :<|> b) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (a :<|> b) = Foreign ftype a :<|> Foreign ftype b
type MkLink (a :<|> b :: Type) r 
Instance details

Defined in Servant.Links

type MkLink (a :<|> b :: Type) r = MkLink a r :<|> MkLink b r

data EmptyAPI #

Constructors

EmptyAPI 

Instances

Instances details
Bounded EmptyAPI 
Instance details

Defined in Servant.API.Empty

Enum EmptyAPI 
Instance details

Defined in Servant.API.Empty

Show EmptyAPI 
Instance details

Defined in Servant.API.Empty

Methods

showsPrec :: Int -> EmptyAPI -> ShowS

show :: EmptyAPI -> String

showList :: [EmptyAPI] -> ShowS

Eq EmptyAPI 
Instance details

Defined in Servant.API.Empty

Methods

(==) :: EmptyAPI -> EmptyAPI -> Bool

(/=) :: EmptyAPI -> EmptyAPI -> Bool

HasLink EmptyAPI 
Instance details

Defined in Servant.Links

Associated Types

type MkLink EmptyAPI a 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy EmptyAPI -> Link -> MkLink EmptyAPI a #

HasForeign (lang :: k) ftype EmptyAPI Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype EmptyAPI 
Instance details

Defined in Servant.Foreign.Internal

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy EmptyAPI -> Req ftype -> Foreign ftype EmptyAPI Source #

type Foreign ftype EmptyAPI Source # 
Instance details

Defined in Servant.Foreign.Internal

type MkLink EmptyAPI a 
Instance details

Defined in Servant.Links

data Capture' (mods :: [Type]) (sym :: Symbol) a #

Instances

Instances details
(KnownSymbol sym, HasForeignType lang ftype t, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Capture' mods sym t :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Capture' mods sym t :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Capture' mods sym t :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Capture' mods sym t :> api) -> Req ftype -> Foreign ftype (Capture' mods sym t :> api) Source #

(ToHttpApiData v, HasLink sub) => HasLink (Capture' mods sym v :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (Capture' mods sym v :> sub) -> Link -> MkLink (Capture' mods sym v :> sub) a #

type Foreign ftype (Capture' mods sym t :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Capture' mods sym t :> api) = Foreign ftype api
type MkLink (Capture' mods sym v :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (Capture' mods sym v :> sub :: Type) a = v -> MkLink sub a

data (path :: k) :> a #

Instances

Instances details
(KnownSymbol path, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (path :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (path :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (path :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (path :> api) -> Req ftype -> Foreign ftype (path :> api) Source #

HasForeign lang ftype api => HasForeign (lang :: k) ftype (HttpVersion :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (HttpVersion :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (HttpVersion :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (HttpVersion :> api) -> Req ftype -> Foreign ftype (HttpVersion :> api) Source #

(KnownSymbol sym, HasForeignType lang ftype t, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Capture' mods sym t :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Capture' mods sym t :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Capture' mods sym t :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Capture' mods sym t :> api) -> Req ftype -> Foreign ftype (Capture' mods sym t :> api) Source #

(KnownSymbol sym, HasForeignType lang ftype [t], HasForeign lang ftype sublayout) => HasForeign (lang :: k) ftype (CaptureAll sym t :> sublayout) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (CaptureAll sym t :> sublayout) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (CaptureAll sym t :> sublayout) = Foreign ftype sublayout

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (CaptureAll sym t :> sublayout) -> Req ftype -> Foreign ftype (CaptureAll sym t :> sublayout) Source #

HasForeign lang ftype api => HasForeign (lang :: k) ftype (Description desc :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Description desc :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Description desc :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Description desc :> api) -> Req ftype -> Foreign ftype (Description desc :> api) Source #

HasForeign lang ftype api => HasForeign (lang :: k) ftype (Summary desc :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Summary desc :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Summary desc :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Summary desc :> api) -> Req ftype -> Foreign ftype (Summary desc :> api) Source #

(HasForeignType lang ftype (Maybe a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Fragment a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Fragment a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Fragment a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Fragment a :> api) -> Req ftype -> Foreign ftype (Fragment a :> api) Source #

(KnownSymbol sym, HasForeignType lang ftype (RequiredArgument mods a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Header' mods sym a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Header' mods sym a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Header' mods sym a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Header' mods sym a :> api) -> Req ftype -> Foreign ftype (Header' mods sym a :> api) Source #

HasForeign lang ftype api => HasForeign (lang :: k) ftype (IsSecure :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (IsSecure :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (IsSecure :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (IsSecure :> api) -> Req ftype -> Foreign ftype (IsSecure :> api) Source #

(KnownSymbol sym, HasForeignType lang ftype Bool, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryFlag sym :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (QueryFlag sym :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (QueryFlag sym :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (QueryFlag sym :> api) -> Req ftype -> Foreign ftype (QueryFlag sym :> api) Source #

(KnownSymbol sym, HasForeignType lang ftype (RequiredArgument mods a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryParam' mods sym a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (QueryParam' mods sym a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (QueryParam' mods sym a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (QueryParam' mods sym a :> api) -> Req ftype -> Foreign ftype (QueryParam' mods sym a :> api) Source #

(KnownSymbol sym, HasForeignType lang ftype [a], HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryParams sym a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (QueryParams sym a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (QueryParams sym a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (QueryParams sym a :> api) -> Req ftype -> Foreign ftype (QueryParams sym a :> api) Source #

HasForeign lang ftype api => HasForeign (lang :: k) ftype (RemoteHost :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (RemoteHost :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (RemoteHost :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (RemoteHost :> api) -> Req ftype -> Foreign ftype (RemoteHost :> api) Source #

(Elem JSON list, HasForeignType lang ftype a, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (ReqBody' mods list a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (ReqBody' mods list a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (ReqBody' mods list a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (ReqBody' mods list a :> api) -> Req ftype -> Foreign ftype (ReqBody' mods list a :> api) Source #

HasForeign lang ftype api => HasForeign (lang :: k) ftype (StreamBody' mods framing ctype a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (StreamBody' mods framing ctype a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (StreamBody' mods framing ctype a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (StreamBody' mods framing ctype a :> api) -> Req ftype -> Foreign ftype (StreamBody' mods framing ctype a :> api) Source #

HasForeign lang ftype api => HasForeign (lang :: k) ftype (Vault :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Vault :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Vault :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Vault :> api) -> Req ftype -> Foreign ftype (Vault :> api) Source #

HasForeign lang ftype api => HasForeign (lang :: k1) ftype (WithResource res :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (WithResource res :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (WithResource res :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (WithResource res :> api) -> Req ftype -> Foreign ftype (WithResource res :> api) Source #

(TypeError (PartialApplication (HasLink :: Type -> Constraint) arr) :: Constraint) => HasLink (arr :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a0) -> Proxy (arr :> sub) -> Link -> MkLink (arr :> sub) a0 #

(KnownSymbol sym, HasLink sub) => HasLink (sym :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (sym :> sub) -> Link -> MkLink (sym :> sub) a #

HasLink sub => HasLink (HttpVersion :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (HttpVersion :> sub) -> Link -> MkLink (HttpVersion :> sub) a #

HasLink sub => HasLink (BasicAuth realm a :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a0) -> Proxy (BasicAuth realm a :> sub) -> Link -> MkLink (BasicAuth realm a :> sub) a0 #

(ToHttpApiData v, HasLink sub) => HasLink (Capture' mods sym v :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (Capture' mods sym v :> sub) -> Link -> MkLink (Capture' mods sym v :> sub) a #

(ToHttpApiData v, HasLink sub) => HasLink (CaptureAll sym v :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (CaptureAll sym v :> sub) -> Link -> MkLink (CaptureAll sym v :> sub) a #

HasLink sub => HasLink (Description s :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (Description s :> sub) -> Link -> MkLink (Description s :> sub) a #

HasLink sub => HasLink (Summary s :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (Summary s :> sub) -> Link -> MkLink (Summary s :> sub) a #

HasLink sub => HasLink (AuthProtect tag :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (AuthProtect tag :> sub) -> Link -> MkLink (AuthProtect tag :> sub) a #

(HasLink sub, ToHttpApiData v) => HasLink (Fragment v :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (Fragment v :> sub) -> Link -> MkLink (Fragment v :> sub) a #

HasLink sub => HasLink (Header' mods sym a :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a0) -> Proxy (Header' mods sym a :> sub) -> Link -> MkLink (Header' mods sym a :> sub) a0 #

HasLink sub => HasLink (IsSecure :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (IsSecure :> sub) -> Link -> MkLink (IsSecure :> sub) a #

(KnownSymbol sym, HasLink sub) => HasLink (QueryFlag sym :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (QueryFlag sym :> sub) -> Link -> MkLink (QueryFlag sym :> sub) a #

(KnownSymbol sym, ToHttpApiData v, HasLink sub, SBoolI (FoldRequired mods)) => HasLink (QueryParam' mods sym v :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (QueryParam' mods sym v :> sub) -> Link -> MkLink (QueryParam' mods sym v :> sub) a #

(KnownSymbol sym, ToHttpApiData v, HasLink sub) => HasLink (QueryParams sym v :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (QueryParams sym v :> sub) -> Link -> MkLink (QueryParams sym v :> sub) a #

HasLink sub => HasLink (RemoteHost :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (RemoteHost :> sub) -> Link -> MkLink (RemoteHost :> sub) a #

HasLink sub => HasLink (ReqBody' mods ct a :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a0) -> Proxy (ReqBody' mods ct a :> sub) -> Link -> MkLink (ReqBody' mods ct a :> sub) a0 #

HasLink sub => HasLink (StreamBody' mods framing ct a :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a0) -> Proxy (StreamBody' mods framing ct a :> sub) -> Link -> MkLink (StreamBody' mods framing ct a :> sub) a0 #

HasLink sub => HasLink (WithResource res :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (WithResource res :> sub) -> Link -> MkLink (WithResource res :> sub) a #

HasLink sub => HasLink (Vault :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (Vault :> sub) -> Link -> MkLink (Vault :> sub) a #

(TypeError (NoInstanceForSub (HasLink :: Type -> Constraint) ty) :: Constraint) => HasLink (ty :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (ty :> sub) -> Link -> MkLink (ty :> sub) a #

type Foreign ftype (path :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (path :> api) = Foreign ftype api
type Foreign ftype (HttpVersion :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (HttpVersion :> api) = Foreign ftype api
type Foreign ftype (Capture' mods sym t :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Capture' mods sym t :> api) = Foreign ftype api
type Foreign ftype (CaptureAll sym t :> sublayout) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (CaptureAll sym t :> sublayout) = Foreign ftype sublayout
type Foreign ftype (Description desc :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Description desc :> api) = Foreign ftype api
type Foreign ftype (Summary desc :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Summary desc :> api) = Foreign ftype api
type Foreign ftype (Fragment a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Fragment a :> api) = Foreign ftype api
type Foreign ftype (Header' mods sym a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Header' mods sym a :> api) = Foreign ftype api
type Foreign ftype (IsSecure :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (IsSecure :> api) = Foreign ftype api
type Foreign ftype (QueryFlag sym :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (QueryFlag sym :> api) = Foreign ftype api
type Foreign ftype (QueryParam' mods sym a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (QueryParam' mods sym a :> api) = Foreign ftype api
type Foreign ftype (QueryParams sym a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (QueryParams sym a :> api) = Foreign ftype api
type Foreign ftype (RemoteHost :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (RemoteHost :> api) = Foreign ftype api
type Foreign ftype (ReqBody' mods list a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (ReqBody' mods list a :> api) = Foreign ftype api
type Foreign ftype (StreamBody' mods framing ctype a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (StreamBody' mods framing ctype a :> api) = Foreign ftype api
type Foreign ftype (WithResource res :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (WithResource res :> api) = Foreign ftype api
type Foreign ftype (Vault :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Vault :> api) = Foreign ftype api
type MkLink (arr :> sub :: Type) _1 
Instance details

Defined in Servant.Links

type MkLink (arr :> sub :: Type) _1 = TypeError (PartialApplication (HasLink :: Type -> Constraint) arr) :: Type
type MkLink (sym :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (sym :> sub :: Type) a = MkLink sub a
type MkLink (HttpVersion :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (HttpVersion :> sub :: Type) a = MkLink sub a
type MkLink (BasicAuth realm a :> sub :: Type) r 
Instance details

Defined in Servant.Links

type MkLink (BasicAuth realm a :> sub :: Type) r = MkLink sub r
type MkLink (Capture' mods sym v :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (Capture' mods sym v :> sub :: Type) a = v -> MkLink sub a
type MkLink (CaptureAll sym v :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (CaptureAll sym v :> sub :: Type) a = [v] -> MkLink sub a
type MkLink (Description s :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (Description s :> sub :: Type) a = MkLink sub a
type MkLink (Summary s :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (Summary s :> sub :: Type) a = MkLink sub a
type MkLink (AuthProtect tag :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (AuthProtect tag :> sub :: Type) a = MkLink sub a
type MkLink (Fragment v :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (Fragment v :> sub :: Type) a = v -> MkLink sub a
type MkLink (Header' mods sym a :> sub :: Type) r 
Instance details

Defined in Servant.Links

type MkLink (Header' mods sym a :> sub :: Type) r = MkLink sub r
type MkLink (IsSecure :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (IsSecure :> sub :: Type) a = MkLink sub a
type MkLink (QueryFlag sym :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (QueryFlag sym :> sub :: Type) a = Bool -> MkLink sub a
type MkLink (QueryParam' mods sym v :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (QueryParam' mods sym v :> sub :: Type) a = If (FoldRequired mods) v (Maybe v) -> MkLink sub a
type MkLink (QueryParams sym v :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (QueryParams sym v :> sub :: Type) a = [v] -> MkLink sub a
type MkLink (RemoteHost :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (RemoteHost :> sub :: Type) a = MkLink sub a
type MkLink (ReqBody' mods ct a :> sub :: Type) r 
Instance details

Defined in Servant.Links

type MkLink (ReqBody' mods ct a :> sub :: Type) r = MkLink sub r
type MkLink (StreamBody' mods framing ct a :> sub :: Type) r 
Instance details

Defined in Servant.Links

type MkLink (StreamBody' mods framing ct a :> sub :: Type) r = MkLink sub r
type MkLink (WithResource res :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (WithResource res :> sub :: Type) a = MkLink sub a
type MkLink (Vault :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (Vault :> sub :: Type) a = MkLink sub a

data CaptureAll (sym :: Symbol) a #

Instances

Instances details
(KnownSymbol sym, HasForeignType lang ftype [t], HasForeign lang ftype sublayout) => HasForeign (lang :: k) ftype (CaptureAll sym t :> sublayout) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (CaptureAll sym t :> sublayout) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (CaptureAll sym t :> sublayout) = Foreign ftype sublayout

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (CaptureAll sym t :> sublayout) -> Req ftype -> Foreign ftype (CaptureAll sym t :> sublayout) Source #

(ToHttpApiData v, HasLink sub) => HasLink (CaptureAll sym v :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (CaptureAll sym v :> sub) -> Link -> MkLink (CaptureAll sym v :> sub) a #

type Foreign ftype (CaptureAll sym t :> sublayout) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (CaptureAll sym t :> sublayout) = Foreign ftype sublayout
type MkLink (CaptureAll sym v :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (CaptureAll sym v :> sub :: Type) a = [v] -> MkLink sub a

data JSON #

Instances

Instances details
Accept JSON 
Instance details

Defined in Servant.API.ContentTypes

Methods

contentType :: Proxy JSON -> MediaType #

contentTypes :: Proxy JSON -> NonEmpty MediaType #

ToJSON a => MimeRender JSON a 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeRender :: Proxy JSON -> a -> ByteString #

FromJSON a => MimeUnrender JSON a 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeUnrender :: Proxy JSON -> ByteString -> Either String a #

mimeUnrenderWithType :: Proxy JSON -> MediaType -> ByteString -> Either String a #

MimeRender JSON a => MimeRender JSON (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeRender :: Proxy JSON -> WithStatus _status a -> ByteString #

MimeUnrender JSON a => MimeUnrender JSON (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeUnrender :: Proxy JSON -> ByteString -> Either String (WithStatus _status a) #

mimeUnrenderWithType :: Proxy JSON -> MediaType -> ByteString -> Either String (WithStatus _status a) #

class ReflectMethod (a :: k) where #

Methods

reflectMethod :: Proxy a -> Method #

Instances

Instances details
ReflectMethod 'CONNECT 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'CONNECT -> Method #

ReflectMethod 'DELETE 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'DELETE -> Method #

ReflectMethod 'GET 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'GET -> Method #

ReflectMethod 'HEAD 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'HEAD -> Method #

ReflectMethod 'OPTIONS 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'OPTIONS -> Method #

ReflectMethod 'PATCH 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'PATCH -> Method #

ReflectMethod 'POST 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'POST -> Method #

ReflectMethod 'PUT 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'PUT -> Method #

ReflectMethod 'TRACE 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'TRACE -> Method #

data Verb (method :: k1) (statusCode :: Nat) (contentTypes :: [Type]) a #

Instances

Instances details
(Elem JSON list, HasForeignType lang ftype a, ReflectMethod method) => HasForeign (lang :: k) ftype (Verb method status list a) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Verb method status list a) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Verb method status list a) = Req ftype

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Verb method status list a) -> Req ftype -> Foreign ftype (Verb method status list a) Source #

HasLink (Verb m s ct a :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a0) -> Proxy (Verb m s ct a) -> Link -> MkLink (Verb m s ct a) a0 #

Generic (Verb method statusCode contentTypes a) 
Instance details

Defined in Servant.API.Verbs

Associated Types

type Rep (Verb method statusCode contentTypes a) 
Instance details

Defined in Servant.API.Verbs

type Rep (Verb method statusCode contentTypes a) = D1 ('MetaData "Verb" "Servant.API.Verbs" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (V1 :: Type -> Type)

Methods

from :: Verb method statusCode contentTypes a -> Rep (Verb method statusCode contentTypes a) x

to :: Rep (Verb method statusCode contentTypes a) x -> Verb method statusCode contentTypes a

AtMostOneFragment (Verb m s ct typ) 
Instance details

Defined in Servant.API.TypeLevel

type Foreign ftype (Verb method status list a) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Verb method status list a) = Req ftype
type MkLink (Verb m s ct a :: Type) r 
Instance details

Defined in Servant.Links

type MkLink (Verb m s ct a :: Type) r = r
type Rep (Verb method statusCode contentTypes a) 
Instance details

Defined in Servant.API.Verbs

type Rep (Verb method statusCode contentTypes a) = D1 ('MetaData "Verb" "Servant.API.Verbs" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (V1 :: Type -> Type)

data NoContentVerb (method :: k1) #

Instances

Instances details
(HasForeignType lang ftype NoContent, ReflectMethod method) => HasForeign (lang :: k) ftype (NoContentVerb method) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (NoContentVerb method) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (NoContentVerb method) = Req ftype

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (NoContentVerb method) -> Req ftype -> Foreign ftype (NoContentVerb method) Source #

HasLink (NoContentVerb m :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (NoContentVerb m) -> Link -> MkLink (NoContentVerb m) a #

Generic (NoContentVerb method) 
Instance details

Defined in Servant.API.Verbs

Associated Types

type Rep (NoContentVerb method) 
Instance details

Defined in Servant.API.Verbs

type Rep (NoContentVerb method) = D1 ('MetaData "NoContentVerb" "Servant.API.Verbs" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (V1 :: Type -> Type)

Methods

from :: NoContentVerb method -> Rep (NoContentVerb method) x

to :: Rep (NoContentVerb method) x -> NoContentVerb method

type Foreign ftype (NoContentVerb method) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (NoContentVerb method) = Req ftype
type MkLink (NoContentVerb m :: Type) r 
Instance details

Defined in Servant.Links

type MkLink (NoContentVerb m :: Type) r = r
type Rep (NoContentVerb method) 
Instance details

Defined in Servant.API.Verbs

type Rep (NoContentVerb method) = D1 ('MetaData "NoContentVerb" "Servant.API.Verbs" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (V1 :: Type -> Type)

data Stream (method :: k1) (status :: Nat) framing contentType a #

Instances

Instances details
(ct ~ JSON, HasForeignType lang ftype a, ReflectMethod method) => HasForeign (lang :: k) ftype (Stream method status framing ct a) Source #

TODO: doesn't taking framing into account.

Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Stream method status framing ct a) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Stream method status framing ct a) = Req ftype

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Stream method status framing ct a) -> Req ftype -> Foreign ftype (Stream method status framing ct a) Source #

HasLink (Stream m status fr ct a :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a0) -> Proxy (Stream m status fr ct a) -> Link -> MkLink (Stream m status fr ct a) a0 #

Generic (Stream method status framing contentType a) 
Instance details

Defined in Servant.API.Stream

Associated Types

type Rep (Stream method status framing contentType a) 
Instance details

Defined in Servant.API.Stream

type Rep (Stream method status framing contentType a) = D1 ('MetaData "Stream" "Servant.API.Stream" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (V1 :: Type -> Type)

Methods

from :: Stream method status framing contentType a -> Rep (Stream method status framing contentType a) x

to :: Rep (Stream method status framing contentType a) x -> Stream method status framing contentType a

type Foreign ftype (Stream method status framing ct a) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Stream method status framing ct a) = Req ftype
type MkLink (Stream m status fr ct a :: Type) r 
Instance details

Defined in Servant.Links

type MkLink (Stream m status fr ct a :: Type) r = r
type Rep (Stream method status framing contentType a) 
Instance details

Defined in Servant.API.Stream

type Rep (Stream method status framing contentType a) = D1 ('MetaData "Stream" "Servant.API.Stream" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (V1 :: Type -> Type)

data Header' (mods :: [Type]) (sym :: Symbol) a #

Instances

Instances details
(KnownSymbol h, ToHttpApiData v) => AddHeader mods h v (Headers (fst ': rest) a) (Headers (Header' mods h v ': (fst ': rest)) a) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

addOptionalHeader :: ResponseHeader h v -> Headers (fst ': rest) a -> Headers (Header' mods h v ': (fst ': rest)) a

(KnownSymbol sym, HasForeignType lang ftype (RequiredArgument mods a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Header' mods sym a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Header' mods sym a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Header' mods sym a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Header' mods sym a :> api) -> Req ftype -> Foreign ftype (Header' mods sym a :> api) Source #

HasResponseHeader h a (Header' mods h a ': rest) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

hlistLookupHeader :: HList (Header' mods h a ': rest) -> ResponseHeader h a

HasLink sub => HasLink (Header' mods sym a :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a0) -> Proxy (Header' mods sym a :> sub) -> Link -> MkLink (Header' mods sym a :> sub) a0 #

(FromHttpApiData v, BuildHeadersTo xs, KnownSymbol h) => BuildHeadersTo (Header' mods h v ': xs) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

buildHeadersTo :: [Header] -> HList (Header' mods h v ': xs) #

(KnownSymbol h, GetHeadersFromHList rest, ToHttpApiData v) => GetHeaders' (Header' mods h v ': rest) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

getHeaders' :: Headers (Header' mods h v ': rest) a -> [Header]

(KnownSymbol h, ToHttpApiData x, GetHeadersFromHList xs) => GetHeadersFromHList (Header' mods h x ': xs) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

getHeadersFromHList :: HList (Header' mods h x ': xs) -> [Header]

type Foreign ftype (Header' mods sym a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Header' mods sym a :> api) = Foreign ftype api
type MkLink (Header' mods sym a :> sub :: Type) r 
Instance details

Defined in Servant.Links

type MkLink (Header' mods sym a :> sub :: Type) r = MkLink sub r

data QueryParam' (mods :: [Type]) (sym :: Symbol) a #

Instances

Instances details
(KnownSymbol sym, HasForeignType lang ftype (RequiredArgument mods a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryParam' mods sym a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (QueryParam' mods sym a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (QueryParam' mods sym a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (QueryParam' mods sym a :> api) -> Req ftype -> Foreign ftype (QueryParam' mods sym a :> api) Source #

(KnownSymbol sym, ToHttpApiData v, HasLink sub, SBoolI (FoldRequired mods)) => HasLink (QueryParam' mods sym v :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (QueryParam' mods sym v :> sub) -> Link -> MkLink (QueryParam' mods sym v :> sub) a #

type Foreign ftype (QueryParam' mods sym a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (QueryParam' mods sym a :> api) = Foreign ftype api
type MkLink (QueryParam' mods sym v :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (QueryParam' mods sym v :> sub :: Type) a = If (FoldRequired mods) v (Maybe v) -> MkLink sub a

data QueryParams (sym :: Symbol) a #

Instances

Instances details
(KnownSymbol sym, HasForeignType lang ftype [a], HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryParams sym a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (QueryParams sym a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (QueryParams sym a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (QueryParams sym a :> api) -> Req ftype -> Foreign ftype (QueryParams sym a :> api) Source #

(KnownSymbol sym, ToHttpApiData v, HasLink sub) => HasLink (QueryParams sym v :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (QueryParams sym v :> sub) -> Link -> MkLink (QueryParams sym v :> sub) a #

type Foreign ftype (QueryParams sym a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (QueryParams sym a :> api) = Foreign ftype api
type MkLink (QueryParams sym v :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (QueryParams sym v :> sub :: Type) a = [v] -> MkLink sub a

data QueryFlag (sym :: Symbol) #

Instances

Instances details
(KnownSymbol sym, HasForeignType lang ftype Bool, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryFlag sym :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (QueryFlag sym :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (QueryFlag sym :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (QueryFlag sym :> api) -> Req ftype -> Foreign ftype (QueryFlag sym :> api) Source #

(KnownSymbol sym, HasLink sub) => HasLink (QueryFlag sym :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (QueryFlag sym :> sub) -> Link -> MkLink (QueryFlag sym :> sub) a #

type Foreign ftype (QueryFlag sym :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (QueryFlag sym :> api) = Foreign ftype api
type MkLink (QueryFlag sym :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (QueryFlag sym :> sub :: Type) a = Bool -> MkLink sub a

data Fragment a #

Instances

Instances details
(HasForeignType lang ftype (Maybe a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Fragment a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Fragment a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Fragment a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Fragment a :> api) -> Req ftype -> Foreign ftype (Fragment a :> api) Source #

(HasLink sub, ToHttpApiData v) => HasLink (Fragment v :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (Fragment v :> sub) -> Link -> MkLink (Fragment v :> sub) a #

AtMostOneFragment (Fragment a) 
Instance details

Defined in Servant.API.TypeLevel

type Foreign ftype (Fragment a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Fragment a :> api) = Foreign ftype api
type MkLink (Fragment v :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (Fragment v :> sub :: Type) a = v -> MkLink sub a

data Raw #

Instances

Instances details
HasLink Raw 
Instance details

Defined in Servant.Links

Associated Types

type MkLink Raw a 
Instance details

Defined in Servant.Links

type MkLink Raw a = a

Methods

toLink :: (Link -> a) -> Proxy Raw -> Link -> MkLink Raw a #

HasForeign (lang :: k) ftype Raw Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype Raw 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype Raw = Method -> Req ftype

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy Raw -> Req ftype -> Foreign ftype Raw Source #

type Foreign ftype Raw Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype Raw = Method -> Req ftype
type MkLink Raw a 
Instance details

Defined in Servant.Links

type MkLink Raw a = a

data ReqBody' (mods :: [Type]) (contentTypes :: [Type]) a #

Instances

Instances details
(Elem JSON list, HasForeignType lang ftype a, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (ReqBody' mods list a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (ReqBody' mods list a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (ReqBody' mods list a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (ReqBody' mods list a :> api) -> Req ftype -> Foreign ftype (ReqBody' mods list a :> api) Source #

HasLink sub => HasLink (ReqBody' mods ct a :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a0) -> Proxy (ReqBody' mods ct a :> sub) -> Link -> MkLink (ReqBody' mods ct a :> sub) a0 #

type Foreign ftype (ReqBody' mods list a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (ReqBody' mods list a :> api) = Foreign ftype api
type MkLink (ReqBody' mods ct a :> sub :: Type) r 
Instance details

Defined in Servant.Links

type MkLink (ReqBody' mods ct a :> sub :: Type) r = MkLink sub r

data StreamBody' (mods :: [Type]) framing contentType a #

Instances

Instances details
HasForeign lang ftype api => HasForeign (lang :: k) ftype (StreamBody' mods framing ctype a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (StreamBody' mods framing ctype a :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (StreamBody' mods framing ctype a :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (StreamBody' mods framing ctype a :> api) -> Req ftype -> Foreign ftype (StreamBody' mods framing ctype a :> api) Source #

HasLink sub => HasLink (StreamBody' mods framing ct a :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a0) -> Proxy (StreamBody' mods framing ct a :> sub) -> Link -> MkLink (StreamBody' mods framing ct a :> sub) a0 #

Generic (StreamBody' mods framing contentType a) 
Instance details

Defined in Servant.API.Stream

Associated Types

type Rep (StreamBody' mods framing contentType a) 
Instance details

Defined in Servant.API.Stream

type Rep (StreamBody' mods framing contentType a) = D1 ('MetaData "StreamBody'" "Servant.API.Stream" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (V1 :: Type -> Type)

Methods

from :: StreamBody' mods framing contentType a -> Rep (StreamBody' mods framing contentType a) x

to :: Rep (StreamBody' mods framing contentType a) x -> StreamBody' mods framing contentType a

type Foreign ftype (StreamBody' mods framing ctype a :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (StreamBody' mods framing ctype a :> api) = Foreign ftype api
type MkLink (StreamBody' mods framing ct a :> sub :: Type) r 
Instance details

Defined in Servant.Links

type MkLink (StreamBody' mods framing ct a :> sub :: Type) r = MkLink sub r
type Rep (StreamBody' mods framing contentType a) 
Instance details

Defined in Servant.API.Stream

type Rep (StreamBody' mods framing contentType a) = D1 ('MetaData "StreamBody'" "Servant.API.Stream" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (V1 :: Type -> Type)

data RemoteHost #

Instances

Instances details
HasForeign lang ftype api => HasForeign (lang :: k) ftype (RemoteHost :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (RemoteHost :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (RemoteHost :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (RemoteHost :> api) -> Req ftype -> Foreign ftype (RemoteHost :> api) Source #

HasLink sub => HasLink (RemoteHost :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (RemoteHost :> sub) -> Link -> MkLink (RemoteHost :> sub) a #

type Foreign ftype (RemoteHost :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (RemoteHost :> api) = Foreign ftype api
type MkLink (RemoteHost :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (RemoteHost :> sub :: Type) a = MkLink sub a

data IsSecure #

Constructors

Secure 
NotSecure 

Instances

Instances details
Generic IsSecure 
Instance details

Defined in Servant.API.IsSecure

Associated Types

type Rep IsSecure 
Instance details

Defined in Servant.API.IsSecure

type Rep IsSecure = D1 ('MetaData "IsSecure" "Servant.API.IsSecure" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (C1 ('MetaCons "Secure" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotSecure" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: IsSecure -> Rep IsSecure x

to :: Rep IsSecure x -> IsSecure

Read IsSecure 
Instance details

Defined in Servant.API.IsSecure

Methods

readsPrec :: Int -> ReadS IsSecure

readList :: ReadS [IsSecure]

readPrec :: ReadPrec IsSecure

readListPrec :: ReadPrec [IsSecure]

Show IsSecure 
Instance details

Defined in Servant.API.IsSecure

Methods

showsPrec :: Int -> IsSecure -> ShowS

show :: IsSecure -> String

showList :: [IsSecure] -> ShowS

Eq IsSecure 
Instance details

Defined in Servant.API.IsSecure

Methods

(==) :: IsSecure -> IsSecure -> Bool

(/=) :: IsSecure -> IsSecure -> Bool

Ord IsSecure 
Instance details

Defined in Servant.API.IsSecure

Methods

compare :: IsSecure -> IsSecure -> Ordering

(<) :: IsSecure -> IsSecure -> Bool

(<=) :: IsSecure -> IsSecure -> Bool

(>) :: IsSecure -> IsSecure -> Bool

(>=) :: IsSecure -> IsSecure -> Bool

max :: IsSecure -> IsSecure -> IsSecure

min :: IsSecure -> IsSecure -> IsSecure

HasForeign lang ftype api => HasForeign (lang :: k) ftype (IsSecure :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (IsSecure :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (IsSecure :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (IsSecure :> api) -> Req ftype -> Foreign ftype (IsSecure :> api) Source #

HasLink sub => HasLink (IsSecure :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (IsSecure :> sub) -> Link -> MkLink (IsSecure :> sub) a #

type Rep IsSecure 
Instance details

Defined in Servant.API.IsSecure

type Rep IsSecure = D1 ('MetaData "IsSecure" "Servant.API.IsSecure" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (C1 ('MetaCons "Secure" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotSecure" 'PrefixI 'False) (U1 :: Type -> Type))
type Foreign ftype (IsSecure :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (IsSecure :> api) = Foreign ftype api
type MkLink (IsSecure :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (IsSecure :> sub :: Type) a = MkLink sub a

type Vault = Vault RealWorld #

data WithNamedContext (name :: Symbol) (subContext :: [Type]) (subApi :: k) #

Instances

Instances details
HasForeign lang ftype api => HasForeign (lang :: k) ftype (WithNamedContext name context api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (WithNamedContext name context api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (WithNamedContext name context api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (WithNamedContext name context api) -> Req ftype -> Foreign ftype (WithNamedContext name context api) Source #

HasLink sub => HasLink (WithNamedContext name context sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (WithNamedContext name context sub) -> Link -> MkLink (WithNamedContext name context sub) a #

type Foreign ftype (WithNamedContext name context api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (WithNamedContext name context api) = Foreign ftype api
type MkLink (WithNamedContext name context sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (WithNamedContext name context sub :: Type) a = MkLink sub a

data WithResource (res :: k) #

Instances

Instances details
HasForeign lang ftype api => HasForeign (lang :: k1) ftype (WithResource res :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (WithResource res :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (WithResource res :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (WithResource res :> api) -> Req ftype -> Foreign ftype (WithResource res :> api) Source #

HasLink sub => HasLink (WithResource res :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (WithResource res :> sub) -> Link -> MkLink (WithResource res :> sub) a #

type Foreign ftype (WithResource res :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (WithResource res :> api) = Foreign ftype api
type MkLink (WithResource res :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (WithResource res :> sub :: Type) a = MkLink sub a

data HttpVersion #

Constructors

HttpVersion 

Fields

Instances

Instances details
Data HttpVersion 
Instance details

Defined in Network.HTTP.Types.Version

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HttpVersion -> c HttpVersion

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HttpVersion

toConstr :: HttpVersion -> Constr

dataTypeOf :: HttpVersion -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HttpVersion)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HttpVersion)

gmapT :: (forall b. Data b => b -> b) -> HttpVersion -> HttpVersion

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HttpVersion -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HttpVersion -> r

gmapQ :: (forall d. Data d => d -> u) -> HttpVersion -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> HttpVersion -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HttpVersion -> m HttpVersion

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HttpVersion -> m HttpVersion

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HttpVersion -> m HttpVersion

Generic HttpVersion 
Instance details

Defined in Network.HTTP.Types.Version

Associated Types

type Rep HttpVersion 
Instance details

Defined in Network.HTTP.Types.Version

type Rep HttpVersion = D1 ('MetaData "HttpVersion" "Network.HTTP.Types.Version" "http-types-0.12.4-CgK3BWPrdpV5aP47TlQ3wt" 'False) (C1 ('MetaCons "HttpVersion" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpMajor") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Just "httpMinor") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int)))

Methods

from :: HttpVersion -> Rep HttpVersion x

to :: Rep HttpVersion x -> HttpVersion

Show HttpVersion 
Instance details

Defined in Network.HTTP.Types.Version

Methods

showsPrec :: Int -> HttpVersion -> ShowS

show :: HttpVersion -> String

showList :: [HttpVersion] -> ShowS

Eq HttpVersion 
Instance details

Defined in Network.HTTP.Types.Version

Methods

(==) :: HttpVersion -> HttpVersion -> Bool

(/=) :: HttpVersion -> HttpVersion -> Bool

Ord HttpVersion 
Instance details

Defined in Network.HTTP.Types.Version

HasForeign lang ftype api => HasForeign (lang :: k) ftype (HttpVersion :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (HttpVersion :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (HttpVersion :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (HttpVersion :> api) -> Req ftype -> Foreign ftype (HttpVersion :> api) Source #

HasLink sub => HasLink (HttpVersion :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (HttpVersion :> sub) -> Link -> MkLink (HttpVersion :> sub) a #

type Rep HttpVersion 
Instance details

Defined in Network.HTTP.Types.Version

type Rep HttpVersion = D1 ('MetaData "HttpVersion" "Network.HTTP.Types.Version" "http-types-0.12.4-CgK3BWPrdpV5aP47TlQ3wt" 'False) (C1 ('MetaCons "HttpVersion" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpMajor") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Just "httpMinor") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int)))
type Foreign ftype (HttpVersion :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (HttpVersion :> api) = Foreign ftype api
type MkLink (HttpVersion :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (HttpVersion :> sub :: Type) a = MkLink sub a

data Summary (sym :: Symbol) #

Instances

Instances details
HasForeign lang ftype api => HasForeign (lang :: k) ftype (Summary desc :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Summary desc :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Summary desc :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Summary desc :> api) -> Req ftype -> Foreign ftype (Summary desc :> api) Source #

HasLink sub => HasLink (Summary s :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (Summary s :> sub) -> Link -> MkLink (Summary s :> sub) a #

type Foreign ftype (Summary desc :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Summary desc :> api) = Foreign ftype api
type MkLink (Summary s :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (Summary s :> sub :: Type) a = MkLink sub a

data Description (sym :: Symbol) #

Instances

Instances details
HasForeign lang ftype api => HasForeign (lang :: k) ftype (Description desc :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (Description desc :> api) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Description desc :> api) = Foreign ftype api

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Description desc :> api) -> Req ftype -> Foreign ftype (Description desc :> api) Source #

HasLink sub => HasLink (Description s :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (Description s :> sub) -> Link -> MkLink (Description s :> sub) a #

type Foreign ftype (Description desc :> api) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (Description desc :> api) = Foreign ftype api
type MkLink (Description s :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (Description s :> sub :: Type) a = MkLink sub a

type ToServantApi (routes :: Type -> Type) = ToServant routes AsApi #

data NamedRoutes (api :: Type -> Type) #

Instances

Instances details
HasForeign lang ftype (ToServantApi r) => HasForeign (lang :: k) ftype (NamedRoutes r) Source # 
Instance details

Defined in Servant.Foreign.Internal

Associated Types

type Foreign ftype (NamedRoutes r) 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (NamedRoutes r) = Foreign ftype (ToServantApi r)

Methods

foreignFor :: Proxy lang -> Proxy ftype -> Proxy (NamedRoutes r) -> Req ftype -> Foreign ftype (NamedRoutes r) Source #

(HasLink (ToServantApi routes), forall a. GLink routes a, ErrorIfNoGeneric routes) => HasLink (NamedRoutes routes :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (NamedRoutes routes) -> Link -> MkLink (NamedRoutes routes) a #

type Foreign ftype (NamedRoutes r) Source # 
Instance details

Defined in Servant.Foreign.Internal

type Foreign ftype (NamedRoutes r) = Foreign ftype (ToServantApi r)
type MkLink (NamedRoutes routes :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (NamedRoutes routes :: Type) a = routes (AsLink a)

data Strict #

data ResponseHeader (sym :: Symbol) a #

Constructors

Header a 
MissingHeader 
UndecodableHeader ByteString 

Instances

Instances details
Functor (ResponseHeader sym) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

fmap :: (a -> b) -> ResponseHeader sym a -> ResponseHeader sym b

(<$) :: a -> ResponseHeader sym b -> ResponseHeader sym a

Show a => Show (ResponseHeader sym a) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

showsPrec :: Int -> ResponseHeader sym a -> ShowS

show :: ResponseHeader sym a -> String

showList :: [ResponseHeader sym a] -> ShowS

NFData a => NFData (ResponseHeader sym a) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

rnf :: ResponseHeader sym a -> ()

Eq a => Eq (ResponseHeader sym a) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

(==) :: ResponseHeader sym a -> ResponseHeader sym a -> Bool

(/=) :: ResponseHeader sym a -> ResponseHeader sym a -> Bool

data StdMethod #

Constructors

GET 
POST 
HEAD 
PUT 
DELETE 
TRACE 
CONNECT 
OPTIONS 
PATCH 

Instances

Instances details
Data StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StdMethod -> c StdMethod

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StdMethod

toConstr :: StdMethod -> Constr

dataTypeOf :: StdMethod -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StdMethod)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StdMethod)

gmapT :: (forall b. Data b => b -> b) -> StdMethod -> StdMethod

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StdMethod -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StdMethod -> r

gmapQ :: (forall d. Data d => d -> u) -> StdMethod -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> StdMethod -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StdMethod -> m StdMethod

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StdMethod -> m StdMethod

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StdMethod -> m StdMethod

Bounded StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Enum StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Generic StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Associated Types

type Rep StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

type Rep StdMethod = D1 ('MetaData "StdMethod" "Network.HTTP.Types.Method" "http-types-0.12.4-CgK3BWPrdpV5aP47TlQ3wt" 'False) (((C1 ('MetaCons "GET" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "POST" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "HEAD" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PUT" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DELETE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TRACE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CONNECT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OPTIONS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PATCH" 'PrefixI 'False) (U1 :: Type -> Type)))))

Methods

from :: StdMethod -> Rep StdMethod x

to :: Rep StdMethod x -> StdMethod

Ix StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Read StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Methods

readsPrec :: Int -> ReadS StdMethod

readList :: ReadS [StdMethod]

readPrec :: ReadPrec StdMethod

readListPrec :: ReadPrec [StdMethod]

Show StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Methods

showsPrec :: Int -> StdMethod -> ShowS

show :: StdMethod -> String

showList :: [StdMethod] -> ShowS

Eq StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Methods

(==) :: StdMethod -> StdMethod -> Bool

(/=) :: StdMethod -> StdMethod -> Bool

Ord StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

Methods

compare :: StdMethod -> StdMethod -> Ordering

(<) :: StdMethod -> StdMethod -> Bool

(<=) :: StdMethod -> StdMethod -> Bool

(>) :: StdMethod -> StdMethod -> Bool

(>=) :: StdMethod -> StdMethod -> Bool

max :: StdMethod -> StdMethod -> StdMethod

min :: StdMethod -> StdMethod -> StdMethod

ReflectMethod 'CONNECT 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'CONNECT -> Method #

ReflectMethod 'DELETE 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'DELETE -> Method #

ReflectMethod 'GET 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'GET -> Method #

ReflectMethod 'HEAD 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'HEAD -> Method #

ReflectMethod 'OPTIONS 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'OPTIONS -> Method #

ReflectMethod 'PATCH 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'PATCH -> Method #

ReflectMethod 'POST 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'POST -> Method #

ReflectMethod 'PUT 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'PUT -> Method #

ReflectMethod 'TRACE 
Instance details

Defined in Servant.API.Verbs

Methods

reflectMethod :: Proxy 'TRACE -> Method #

type Rep StdMethod 
Instance details

Defined in Network.HTTP.Types.Method

type Rep StdMethod = D1 ('MetaData "StdMethod" "Network.HTTP.Types.Method" "http-types-0.12.4-CgK3BWPrdpV5aP47TlQ3wt" 'False) (((C1 ('MetaCons "GET" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "POST" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "HEAD" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PUT" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DELETE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TRACE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CONNECT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OPTIONS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PATCH" 'PrefixI 'False) (U1 :: Type -> Type)))))

data BasicAuth (realm :: Symbol) userData #

Instances

Instances details
HasLink sub => HasLink (BasicAuth realm a :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a0) -> Proxy (BasicAuth realm a :> sub) -> Link -> MkLink (BasicAuth realm a :> sub) a0 #

type MkLink (BasicAuth realm a :> sub :: Type) r 
Instance details

Defined in Servant.Links

type MkLink (BasicAuth realm a :> sub :: Type) r = MkLink sub r

data BasicAuthData #

Constructors

BasicAuthData 

Fields

type Capture = Capture' ('[] :: [Type]) #

class Accept (ctype :: k) where #

Minimal complete definition

contentType | contentTypes

Methods

contentType :: Proxy ctype -> MediaType #

contentTypes :: Proxy ctype -> NonEmpty MediaType #

Instances

Instances details
Accept FormUrlEncoded 
Instance details

Defined in Servant.API.ContentTypes

Methods

contentType :: Proxy FormUrlEncoded -> MediaType #

contentTypes :: Proxy FormUrlEncoded -> NonEmpty MediaType #

Accept JSON 
Instance details

Defined in Servant.API.ContentTypes

Methods

contentType :: Proxy JSON -> MediaType #

contentTypes :: Proxy JSON -> NonEmpty MediaType #

Accept OctetStream 
Instance details

Defined in Servant.API.ContentTypes

Methods

contentType :: Proxy OctetStream -> MediaType #

contentTypes :: Proxy OctetStream -> NonEmpty MediaType #

Accept PlainText 
Instance details

Defined in Servant.API.ContentTypes

Methods

contentType :: Proxy PlainText -> MediaType #

contentTypes :: Proxy PlainText -> NonEmpty MediaType #

data FormUrlEncoded #

Instances

Instances details
Accept FormUrlEncoded 
Instance details

Defined in Servant.API.ContentTypes

Methods

contentType :: Proxy FormUrlEncoded -> MediaType #

contentTypes :: Proxy FormUrlEncoded -> NonEmpty MediaType #

ToForm a => MimeRender FormUrlEncoded a 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeRender :: Proxy FormUrlEncoded -> a -> ByteString #

FromForm a => MimeUnrender FormUrlEncoded a 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeUnrender :: Proxy FormUrlEncoded -> ByteString -> Either String a #

mimeUnrenderWithType :: Proxy FormUrlEncoded -> MediaType -> ByteString -> Either String a #

MimeRender FormUrlEncoded a => MimeRender FormUrlEncoded (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeRender :: Proxy FormUrlEncoded -> WithStatus _status a -> ByteString #

MimeUnrender FormUrlEncoded a => MimeUnrender FormUrlEncoded (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeUnrender :: Proxy FormUrlEncoded -> ByteString -> Either String (WithStatus _status a) #

mimeUnrenderWithType :: Proxy FormUrlEncoded -> MediaType -> ByteString -> Either String (WithStatus _status a) #

class Accept ctype => MimeRender (ctype :: k) a where #

Methods

mimeRender :: Proxy ctype -> a -> ByteString #

Instances

Instances details
ToForm a => MimeRender FormUrlEncoded a 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeRender :: Proxy FormUrlEncoded -> a -> ByteString #

ToJSON a => MimeRender JSON a 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeRender :: Proxy JSON -> a -> ByteString #

MimeRender OctetStream ByteString 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeRender :: Proxy OctetStream -> ByteString -> ByteString #

MimeRender OctetStream ByteString 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeRender :: Proxy OctetStream -> ByteString -> ByteString #

MimeRender PlainText Text 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeRender :: Proxy PlainText -> Text -> ByteString #

MimeRender PlainText Text 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeRender :: Proxy PlainText -> Text -> ByteString #

MimeRender PlainText String 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeRender :: Proxy PlainText -> String -> ByteString #

MimeRender FormUrlEncoded a => MimeRender FormUrlEncoded (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeRender :: Proxy FormUrlEncoded -> WithStatus _status a -> ByteString #

MimeRender JSON a => MimeRender JSON (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeRender :: Proxy JSON -> WithStatus _status a -> ByteString #

MimeRender OctetStream a => MimeRender OctetStream (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeRender :: Proxy OctetStream -> WithStatus _status a -> ByteString #

MimeRender PlainText a => MimeRender PlainText (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeRender :: Proxy PlainText -> WithStatus _status a -> ByteString #

class Accept ctype => MimeUnrender (ctype :: k) a where #

Minimal complete definition

mimeUnrender | mimeUnrenderWithType

Methods

mimeUnrender :: Proxy ctype -> ByteString -> Either String a #

mimeUnrenderWithType :: Proxy ctype -> MediaType -> ByteString -> Either String a #

Instances

Instances details
FromForm a => MimeUnrender FormUrlEncoded a 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeUnrender :: Proxy FormUrlEncoded -> ByteString -> Either String a #

mimeUnrenderWithType :: Proxy FormUrlEncoded -> MediaType -> ByteString -> Either String a #

FromJSON a => MimeUnrender JSON a 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeUnrender :: Proxy JSON -> ByteString -> Either String a #

mimeUnrenderWithType :: Proxy JSON -> MediaType -> ByteString -> Either String a #

MimeUnrender OctetStream ByteString 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeUnrender :: Proxy OctetStream -> ByteString -> Either String ByteString #

mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String ByteString #

MimeUnrender OctetStream ByteString 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeUnrender :: Proxy OctetStream -> ByteString -> Either String ByteString #

mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String ByteString #

MimeUnrender PlainText Text 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeUnrender :: Proxy PlainText -> ByteString -> Either String Text #

mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String Text #

MimeUnrender PlainText Text 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeUnrender :: Proxy PlainText -> ByteString -> Either String Text #

mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String Text #

MimeUnrender PlainText String 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeUnrender :: Proxy PlainText -> ByteString -> Either String String #

mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String String #

MimeUnrender FormUrlEncoded a => MimeUnrender FormUrlEncoded (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeUnrender :: Proxy FormUrlEncoded -> ByteString -> Either String (WithStatus _status a) #

mimeUnrenderWithType :: Proxy FormUrlEncoded -> MediaType -> ByteString -> Either String (WithStatus _status a) #

MimeUnrender JSON a => MimeUnrender JSON (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeUnrender :: Proxy JSON -> ByteString -> Either String (WithStatus _status a) #

mimeUnrenderWithType :: Proxy JSON -> MediaType -> ByteString -> Either String (WithStatus _status a) #

MimeUnrender OctetStream a => MimeUnrender OctetStream (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeUnrender :: Proxy OctetStream -> ByteString -> Either String (WithStatus _status a) #

mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String (WithStatus _status a) #

MimeUnrender PlainText a => MimeUnrender PlainText (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeUnrender :: Proxy PlainText -> ByteString -> Either String (WithStatus _status a) #

mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String (WithStatus _status a) #

data OctetStream #

Instances

Instances details
Accept OctetStream 
Instance details

Defined in Servant.API.ContentTypes

Methods

contentType :: Proxy OctetStream -> MediaType #

contentTypes :: Proxy OctetStream -> NonEmpty MediaType #

MimeRender OctetStream ByteString 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeRender :: Proxy OctetStream -> ByteString -> ByteString #

MimeRender OctetStream ByteString 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeRender :: Proxy OctetStream -> ByteString -> ByteString #

MimeUnrender OctetStream ByteString 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeUnrender :: Proxy OctetStream -> ByteString -> Either String ByteString #

mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String ByteString #

MimeUnrender OctetStream ByteString 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeUnrender :: Proxy OctetStream -> ByteString -> Either String ByteString #

mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String ByteString #

MimeRender OctetStream a => MimeRender OctetStream (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeRender :: Proxy OctetStream -> WithStatus _status a -> ByteString #

MimeUnrender OctetStream a => MimeUnrender OctetStream (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeUnrender :: Proxy OctetStream -> ByteString -> Either String (WithStatus _status a) #

mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String (WithStatus _status a) #

data PlainText #

Instances

Instances details
Accept PlainText 
Instance details

Defined in Servant.API.ContentTypes

Methods

contentType :: Proxy PlainText -> MediaType #

contentTypes :: Proxy PlainText -> NonEmpty MediaType #

MimeRender PlainText Text 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeRender :: Proxy PlainText -> Text -> ByteString #

MimeRender PlainText Text 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeRender :: Proxy PlainText -> Text -> ByteString #

MimeRender PlainText String 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeRender :: Proxy PlainText -> String -> ByteString #

MimeUnrender PlainText Text 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeUnrender :: Proxy PlainText -> ByteString -> Either String Text #

mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String Text #

MimeUnrender PlainText Text 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeUnrender :: Proxy PlainText -> ByteString -> Either String Text #

mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String Text #

MimeUnrender PlainText String 
Instance details

Defined in Servant.API.ContentTypes

Methods

mimeUnrender :: Proxy PlainText -> ByteString -> Either String String #

mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String String #

MimeRender PlainText a => MimeRender PlainText (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeRender :: Proxy PlainText -> WithStatus _status a -> ByteString #

MimeUnrender PlainText a => MimeUnrender PlainText (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeUnrender :: Proxy PlainText -> ByteString -> Either String (WithStatus _status a) #

mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String (WithStatus _status a) #

data AuthProtect (tag :: k) #

Instances

Instances details
HasLink sub => HasLink (AuthProtect tag :> sub :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a) -> Proxy (AuthProtect tag :> sub) -> Link -> MkLink (AuthProtect tag :> sub) a #

type MkLink (AuthProtect tag :> sub :: Type) a 
Instance details

Defined in Servant.Links

type MkLink (AuthProtect tag :> sub :: Type) a = MkLink sub a

class GenericMode (mode :: k) #

Associated Types

type (mode :: k) :- api #

Instances

Instances details
GenericMode AsApi 
Instance details

Defined in Servant.API.Generic

Associated Types

type AsApi :- api 
Instance details

Defined in Servant.API.Generic

type AsApi :- api = api
GenericMode (AsLink a :: Type) 
Instance details

Defined in Servant.Links

type family (mode :: k) :- api #

Instances

Instances details
type AsApi :- api 
Instance details

Defined in Servant.API.Generic

type AsApi :- api = api
type (AsLink a :: Type) :- api 
Instance details

Defined in Servant.Links

type (AsLink a :: Type) :- api = MkLink api a

data AsApi #

Instances

Instances details
GenericMode AsApi 
Instance details

Defined in Servant.API.Generic

Associated Types

type AsApi :- api 
Instance details

Defined in Servant.API.Generic

type AsApi :- api = api
type AsApi :- api 
Instance details

Defined in Servant.API.Generic

type AsApi :- api = api

class GServantProduct (f :: k -> Type) #

Minimal complete definition

gtoServant, gfromServant

Instances

Instances details
(GServantProduct l, GServantProduct r) => GServantProduct (l :*: r :: k -> Type) 
Instance details

Defined in Servant.API.Generic

Associated Types

type GToServant (l :*: r :: k -> Type) 
Instance details

Defined in Servant.API.Generic

type GToServant (l :*: r :: k -> Type) = GToServant l :<|> GToServant r

Methods

gtoServant :: forall (p :: k). (l :*: r) p -> GToServant (l :*: r)

gfromServant :: forall (p :: k). GToServant (l :*: r) -> (l :*: r) p

GServantProduct (K1 i c :: k -> Type) 
Instance details

Defined in Servant.API.Generic

Associated Types

type GToServant (K1 i c :: k -> Type) 
Instance details

Defined in Servant.API.Generic

type GToServant (K1 i c :: k -> Type) = c

Methods

gtoServant :: forall (p :: k). K1 i c p -> GToServant (K1 i c :: k -> Type)

gfromServant :: forall (p :: k). GToServant (K1 i c :: k -> Type) -> K1 i c p

GServantProduct f => GServantProduct (M1 i c f :: k -> Type) 
Instance details

Defined in Servant.API.Generic

Associated Types

type GToServant (M1 i c f :: k -> Type) 
Instance details

Defined in Servant.API.Generic

type GToServant (M1 i c f :: k -> Type) = GToServant f

Methods

gtoServant :: forall (p :: k). M1 i c f p -> GToServant (M1 i c f)

gfromServant :: forall (p :: k). GToServant (M1 i c f) -> M1 i c f p

type GenericServant (routes :: k -> Type) (mode :: k) = (GenericMode mode, Generic (routes mode), GServantProduct (Rep (routes mode))) #

type ToServant (routes :: k -> Type) (mode :: k) = GToServant (Rep (routes mode)) #

fromServant :: forall {k} routes (mode :: k). GenericServant routes mode => ToServant routes mode -> routes mode #

genericApi :: forall (routes :: Type -> Type). GenericServant routes AsApi => Proxy routes -> Proxy (ToServantApi routes) #

toServant :: forall {k} routes (mode :: k). GenericServant routes mode => routes mode -> ToServant routes mode #

data Lenient #

data Optional #

data Required #

data DeepQuery (sym :: Symbol) a #

data RawM #

Instances

Instances details
HasLink RawM 
Instance details

Defined in Servant.Links

Associated Types

type MkLink RawM a 
Instance details

Defined in Servant.Links

type MkLink RawM a = a

Methods

toLink :: (Link -> a) -> Proxy RawM -> Link -> MkLink RawM a #

type MkLink RawM a 
Instance details

Defined in Servant.Links

type MkLink RawM a = a

class AddHeader (mods :: [Type]) (h :: Symbol) v orig new | mods h v orig -> new, new -> mods, new -> h, new -> v, new -> orig #

Minimal complete definition

addOptionalHeader

Instances

Instances details
(KnownSymbol h, ToHttpApiData v, new ~ Headers '[Header' mods h v] a) => AddHeader mods h v a new 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

addOptionalHeader :: ResponseHeader h v -> a -> new

(AddHeader mods h v old new, AddHeader mods h v (Union oldrest) (Union newrest), oldrest ~ (a ': as), newrest ~ (b ': bs)) => AddHeader mods h v (Union (old ': (a ': as))) (Union (new ': (b ': bs))) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

addOptionalHeader :: ResponseHeader h v -> Union (old ': (a ': as)) -> Union (new ': (b ': bs))

AddHeader mods h v old new => AddHeader mods h v (Union '[old]) (Union '[new]) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

addOptionalHeader :: ResponseHeader h v -> Union '[old] -> Union '[new]

(KnownSymbol h, ToHttpApiData v) => AddHeader mods h v (Headers (fst ': rest) a) (Headers (Header' mods h v ': (fst ': rest)) a) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

addOptionalHeader :: ResponseHeader h v -> Headers (fst ': rest) a -> Headers (Header' mods h v ': (fst ': rest)) a

class BuildHeadersTo (hs :: [Type]) where #

Methods

buildHeadersTo :: [Header] -> HList hs #

Instances

Instances details
BuildHeadersTo ('[] :: [Type]) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

buildHeadersTo :: [Header] -> HList ('[] :: [Type]) #

(FromHttpApiData v, BuildHeadersTo xs, KnownSymbol h) => BuildHeadersTo (Header' mods h v ': xs) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

buildHeadersTo :: [Header] -> HList (Header' mods h v ': xs) #

class GetHeaders ls where #

Methods

getHeaders :: ls -> [Header] #

Instances

Instances details
GetHeadersFromHList hs => GetHeaders (HList hs) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

getHeaders :: HList hs -> [Header] #

GetHeaders' hs => GetHeaders (Headers hs a) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

getHeaders :: Headers hs a -> [Header] #

data HList (a :: [Type]) where #

Constructors

HNil :: HList ('[] :: [Type]) 
HCons :: forall (h :: Symbol) x (xs :: [Type]) (mods :: [Type]). ResponseHeader h x -> HList xs -> HList (Header' mods h x ': xs) 

Instances

Instances details
NFDataHList xs => NFData (HList xs) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

rnf :: HList xs -> ()

GetHeadersFromHList hs => GetHeaders (HList hs) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

getHeaders :: HList hs -> [Header] #

class HasResponseHeader (h :: Symbol) a (headers :: [Type]) #

Minimal complete definition

hlistLookupHeader

Instances

Instances details
HasResponseHeader h a (Header' mods h a ': rest) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

hlistLookupHeader :: HList (Header' mods h a ': rest) -> ResponseHeader h a

HasResponseHeader h a rest => HasResponseHeader h a (first ': rest) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

hlistLookupHeader :: HList (first ': rest) -> ResponseHeader h a

data Headers (ls :: [Type]) a #

Constructors

Headers 

Fields

Instances

Instances details
(KnownSymbol h, ToHttpApiData v) => AddHeader mods h v (Headers (fst ': rest) a) (Headers (Header' mods h v ': (fst ': rest)) a) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

addOptionalHeader :: ResponseHeader h v -> Headers (fst ': rest) a -> Headers (Header' mods h v ': (fst ': rest)) a

Functor (Headers ls) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

fmap :: (a -> b) -> Headers ls a -> Headers ls b

(<$) :: a -> Headers ls b -> Headers ls a

(NFDataHList ls, NFData a) => NFData (Headers ls a) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

rnf :: Headers ls a -> ()

GetHeaders' hs => GetHeaders (Headers hs a) 
Instance details

Defined in Servant.API.ResponseHeaders

Methods

getHeaders :: Headers hs a -> [Header] #

HasStatus a => HasStatus (Headers ls a) 
Instance details

Defined in Servant.API.UVerb

Associated Types

type StatusOf (Headers ls a) 
Instance details

Defined in Servant.API.UVerb

type StatusOf (Headers ls a) = StatusOf a
type StatusOf (Headers ls a) 
Instance details

Defined in Servant.API.UVerb

type StatusOf (Headers ls a) = StatusOf a

addHeader :: forall (h :: Symbol) v orig new. AddHeader '[Optional, Strict] h v orig new => v -> orig -> new #

addHeader' :: forall (mods :: [Type]) (h :: Symbol) v orig new. AddHeader mods h v orig new => v -> orig -> new #

lookupResponseHeader :: forall (h :: Symbol) a (headers :: [Type]) r. HasResponseHeader h a headers => Headers headers r -> ResponseHeader h a #

noHeader :: forall (h :: Symbol) v orig new. AddHeader '[Optional, Strict] h v orig new => orig -> new #

noHeader' :: forall (mods :: [Type]) (h :: Symbol) v orig new. AddHeader mods h v orig new => orig -> new #

class FramingRender (strategy :: k) where #

Methods

framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy strategy -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString #

Instances

Instances details
FramingRender NetstringFraming 
Instance details

Defined in Servant.API.Stream

Methods

framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy NetstringFraming -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString #

FramingRender NewlineFraming 
Instance details

Defined in Servant.API.Stream

Methods

framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy NewlineFraming -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString #

FramingRender NoFraming 
Instance details

Defined in Servant.API.Stream

Methods

framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy NoFraming -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString #

class FramingUnrender (strategy :: k) where #

Methods

framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy strategy -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a #

Instances

Instances details
FramingUnrender NetstringFraming 
Instance details

Defined in Servant.API.Stream

Methods

framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy NetstringFraming -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a #

FramingUnrender NewlineFraming 
Instance details

Defined in Servant.API.Stream

Methods

framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy NewlineFraming -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a #

FramingUnrender NoFraming 
Instance details

Defined in Servant.API.Stream

Methods

framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy NoFraming -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a #

class FromSourceIO chunk a | a -> chunk where #

Methods

fromSourceIO :: SourceIO chunk -> IO a #

Instances

Instances details
MonadIO m => FromSourceIO a (SourceT m a) 
Instance details

Defined in Servant.API.Stream

Methods

fromSourceIO :: SourceIO a -> IO (SourceT m a) #

data NetstringFraming #

Instances

Instances details
FramingRender NetstringFraming 
Instance details

Defined in Servant.API.Stream

Methods

framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy NetstringFraming -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString #

FramingUnrender NetstringFraming 
Instance details

Defined in Servant.API.Stream

Methods

framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy NetstringFraming -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a #

data NewlineFraming #

Instances

Instances details
FramingRender NewlineFraming 
Instance details

Defined in Servant.API.Stream

Methods

framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy NewlineFraming -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString #

FramingUnrender NewlineFraming 
Instance details

Defined in Servant.API.Stream

Methods

framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy NewlineFraming -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a #

data NoFraming #

Instances

Instances details
FramingRender NoFraming 
Instance details

Defined in Servant.API.Stream

Methods

framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy NoFraming -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString #

FramingUnrender NoFraming 
Instance details

Defined in Servant.API.Stream

Methods

framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy NoFraming -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a #

type SourceIO = SourceT IO #

type StreamBody = StreamBody' ('[] :: [Type]) #

type StreamGet = Stream 'GET 200 #

type StreamPost = Stream 'POST 200 #

class ToSourceIO chunk a | a -> chunk where #

Methods

toSourceIO :: a -> SourceIO chunk #

Instances

Instances details
ToSourceIO a (NonEmpty a) 
Instance details

Defined in Servant.API.Stream

Methods

toSourceIO :: NonEmpty a -> SourceIO a #

ToSourceIO a [a] 
Instance details

Defined in Servant.API.Stream

Methods

toSourceIO :: [a] -> SourceIO a #

SourceToSourceIO m => ToSourceIO chunk (SourceT m chunk) 
Instance details

Defined in Servant.API.Stream

Methods

toSourceIO :: SourceT m chunk -> SourceIO chunk #

type family IsElem endpoint api where ... #

Equations

IsElem e (sa :<|> sb) = Or (IsElem e sa) (IsElem e sb) 
IsElem (e :> sa) (e :> sb) = IsElem sa sb 
IsElem sa (Header sym x :> sb) = IsElem sa sb 
IsElem sa (Header' mods sym x :> sb) = IsElem sa sb 
IsElem sa (ReqBody y x :> sb) = IsElem sa sb 
IsElem (CaptureAll z y :> sa) (CaptureAll x y :> sb) = IsElem sa sb 
IsElem (Capture z y :> sa) (Capture x y :> sb) = IsElem sa sb 
IsElem sa (QueryParam x y :> sb) = IsElem sa sb 
IsElem sa (QueryParams x y :> sb) = IsElem sa sb 
IsElem sa (QueryFlag x :> sb) = IsElem sa sb 
IsElem sa (Fragment x :> sb) = IsElem sa sb 
IsElem (Verb m s ct typ) (Verb m s ct' typ) = IsSubList ct ct' 
IsElem e e = () 
IsElem e (NamedRoutes rs) = IsElem e (ToServantApi rs) 
IsElem e a = IsElem' e a 

type family IsElem' a s #

class KnownStatus (StatusOf a) => HasStatus a #

Associated Types

type StatusOf a :: Nat #

Instances

Instances details
HasStatus NoContent 
Instance details

Defined in Servant.API.UVerb

Associated Types

type StatusOf NoContent 
Instance details

Defined in Servant.API.UVerb

type StatusOf NoContent = 204
HasStatus a => HasStatus (Headers ls a) 
Instance details

Defined in Servant.API.UVerb

Associated Types

type StatusOf (Headers ls a) 
Instance details

Defined in Servant.API.UVerb

type StatusOf (Headers ls a) = StatusOf a
KnownStatus n => HasStatus (WithStatus n a) 
Instance details

Defined in Servant.API.UVerb

Associated Types

type StatusOf (WithStatus n a) 
Instance details

Defined in Servant.API.UVerb

type StatusOf (WithStatus n a) = n

type family StatusOf a :: Nat #

Instances

Instances details
type StatusOf NoContent 
Instance details

Defined in Servant.API.UVerb

type StatusOf NoContent = 204
type StatusOf (Headers ls a) 
Instance details

Defined in Servant.API.UVerb

type StatusOf (Headers ls a) = StatusOf a
type StatusOf (WithStatus n a) 
Instance details

Defined in Servant.API.UVerb

type StatusOf (WithStatus n a) = n

type family Statuses (as :: [Type]) :: [Nat] #

Instances

Instances details
type Statuses ('[] :: [Type]) 
Instance details

Defined in Servant.API.UVerb

type Statuses ('[] :: [Type]) = '[] :: [Nat]
type Statuses (a ': as) 
Instance details

Defined in Servant.API.UVerb

type Statuses (a ': as) = StatusOf a ': Statuses as

type family Statuses (as :: [Type]) :: [Nat] #

Instances

Instances details
type Statuses ('[] :: [Type]) 
Instance details

Defined in Servant.API.UVerb

type Statuses ('[] :: [Type]) = '[] :: [Nat]
type Statuses (a ': as) 
Instance details

Defined in Servant.API.UVerb

type Statuses (a ': as) = StatusOf a ': Statuses as

data UVerb (method :: StdMethod) (contentTypes :: [Type]) (as :: [Type]) #

Instances

Instances details
HasLink (UVerb m ct a :: Type) 
Instance details

Defined in Servant.Links

Methods

toLink :: (Link -> a0) -> Proxy (UVerb m ct a) -> Link -> MkLink (UVerb m ct a) a0 #

AtMostOneFragment (UVerb m cts as) 
Instance details

Defined in Servant.API.TypeLevel

type MkLink (UVerb m ct a :: Type) r 
Instance details

Defined in Servant.Links

type MkLink (UVerb m ct a :: Type) r = r

newtype WithStatus (k :: Nat) a #

Constructors

WithStatus a 

Instances

Instances details
MimeRender FormUrlEncoded a => MimeRender FormUrlEncoded (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeRender :: Proxy FormUrlEncoded -> WithStatus _status a -> ByteString #

MimeRender JSON a => MimeRender JSON (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeRender :: Proxy JSON -> WithStatus _status a -> ByteString #

MimeRender OctetStream a => MimeRender OctetStream (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeRender :: Proxy OctetStream -> WithStatus _status a -> ByteString #

MimeRender PlainText a => MimeRender PlainText (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeRender :: Proxy PlainText -> WithStatus _status a -> ByteString #

MimeUnrender FormUrlEncoded a => MimeUnrender FormUrlEncoded (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeUnrender :: Proxy FormUrlEncoded -> ByteString -> Either String (WithStatus _status a) #

mimeUnrenderWithType :: Proxy FormUrlEncoded -> MediaType -> ByteString -> Either String (WithStatus _status a) #

MimeUnrender JSON a => MimeUnrender JSON (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeUnrender :: Proxy JSON -> ByteString -> Either String (WithStatus _status a) #

mimeUnrenderWithType :: Proxy JSON -> MediaType -> ByteString -> Either String (WithStatus _status a) #

MimeUnrender OctetStream a => MimeUnrender OctetStream (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeUnrender :: Proxy OctetStream -> ByteString -> Either String (WithStatus _status a) #

mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String (WithStatus _status a) #

MimeUnrender PlainText a => MimeUnrender PlainText (WithStatus _status a) 
Instance details

Defined in Servant.API.UVerb

Methods

mimeUnrender :: Proxy PlainText -> ByteString -> Either String (WithStatus _status a) #

mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String (WithStatus _status a) #

Show a => Show (WithStatus k a) 
Instance details

Defined in Servant.API.UVerb

Methods

showsPrec :: Int -> WithStatus k a -> ShowS

show :: WithStatus k a -> String

showList :: [WithStatus k a] -> ShowS

Eq a => Eq (WithStatus k a) 
Instance details

Defined in Servant.API.UVerb

Methods

(==) :: WithStatus k a -> WithStatus k a -> Bool

(/=) :: WithStatus k a -> WithStatus k a -> Bool

KnownStatus n => HasStatus (WithStatus n a) 
Instance details

Defined in Servant.API.UVerb

Associated Types

type StatusOf (WithStatus n a) 
Instance details

Defined in Servant.API.UVerb

type StatusOf (WithStatus n a) = n
type StatusOf (WithStatus n a) 
Instance details

Defined in Servant.API.UVerb

type StatusOf (WithStatus n a) = n

statusOf :: HasStatus a => proxy a -> Status #

type IsMember (a :: u) (as :: [u]) = (Unique as, CheckElemIsMember a as, UElem a as) #

type Union = NS I #

type family Unique (xs :: [k]) where ... #

Equations

Unique (xs :: [k]) = If (Nubbed xs == 'True) () (TypeError (DuplicateElementError xs) :: Constraint) 

inject :: UElem x xs => f x -> NS f xs #

type Delete = Verb 'DELETE 200 #

type Get = Verb 'GET 200 #

type GetAccepted = Verb 'GET 202 #

type Patch = Verb 'PATCH 200 #

type Post = Verb 'POST 200 #

type PostAccepted = Verb 'POST 202 #

type PostCreated = Verb 'POST 201 #

type Put = Verb 'PUT 200 #

type PutAccepted = Verb 'PUT 202 #

type PutCreated = Verb 'PUT 201 #

class HasLink (endpoint :: k) where #

Associated Types

type MkLink (endpoint :: k) a #

Methods

toLink :: (Link -> a) -> Proxy endpoint -> Link -> MkLink endpoint a #

Instances

data Link #

Instances

type family MkLink (endpoint :: k) a #

Instances

safeLink :: (IsElem endpoint api, HasLink endpoint) => Proxy api -> Proxy endpoint -> MkLink endpoint Link #

type family If (cond :: Bool) (tru :: k) (fls :: k) :: k where ... #

Equations

If 'True (tru :: k) (fls :: k) = tru 
If 'False (tru :: k) (fls :: k) = fls 

class FromHttpApiData a where #

Minimal complete definition

parseUrlPiece | parseQueryParam

Methods

parseUrlPiece :: Text -> Either Text a #

parseHeader :: ByteString -> Either Text a #

parseQueryParam :: Text -> Either Text a #

Instances

Instances details
FromHttpApiData All 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text All #

parseHeader :: ByteString -> Either Text All #

parseQueryParam :: Text -> Either Text All #

FromHttpApiData Any 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Any #

parseHeader :: ByteString -> Either Text Any #

parseQueryParam :: Text -> Either Text Any #

FromHttpApiData Version 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Version #

parseHeader :: ByteString -> Either Text Version #

parseQueryParam :: Text -> Either Text Version #

FromHttpApiData Void 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Void #

parseHeader :: ByteString -> Either Text Void #

parseQueryParam :: Text -> Either Text Void #

FromHttpApiData Int16 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Int16 #

parseHeader :: ByteString -> Either Text Int16 #

parseQueryParam :: Text -> Either Text Int16 #

FromHttpApiData Int32 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Int32 #

parseHeader :: ByteString -> Either Text Int32 #

parseQueryParam :: Text -> Either Text Int32 #

FromHttpApiData Int64 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Int64 #

parseHeader :: ByteString -> Either Text Int64 #

parseQueryParam :: Text -> Either Text Int64 #

FromHttpApiData Int8 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Int8 #

parseHeader :: ByteString -> Either Text Int8 #

parseQueryParam :: Text -> Either Text Int8 #

FromHttpApiData Word16 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Word16 #

parseHeader :: ByteString -> Either Text Word16 #

parseQueryParam :: Text -> Either Text Word16 #

FromHttpApiData Word32 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Word32 #

parseHeader :: ByteString -> Either Text Word32 #

parseQueryParam :: Text -> Either Text Word32 #

FromHttpApiData Word64 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Word64 #

parseHeader :: ByteString -> Either Text Word64 #

parseQueryParam :: Text -> Either Text Word64 #

FromHttpApiData Word8 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Word8 #

parseHeader :: ByteString -> Either Text Word8 #

parseQueryParam :: Text -> Either Text Word8 #

FromHttpApiData SetCookie 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text SetCookie #

parseHeader :: ByteString -> Either Text SetCookie #

parseQueryParam :: Text -> Either Text SetCookie #

FromHttpApiData Ordering 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Ordering #

parseHeader :: ByteString -> Either Text Ordering #

parseQueryParam :: Text -> Either Text Ordering #

FromHttpApiData Text 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Text #

parseHeader :: ByteString -> Either Text Text #

parseQueryParam :: Text -> Either Text Text #

FromHttpApiData Text 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Text #

parseHeader :: ByteString -> Either Text Text #

parseQueryParam :: Text -> Either Text Text #

FromHttpApiData Day 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Day #

parseHeader :: ByteString -> Either Text Day #

parseQueryParam :: Text -> Either Text Day #

FromHttpApiData Month 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Month #

parseHeader :: ByteString -> Either Text Month #

parseQueryParam :: Text -> Either Text Month #

FromHttpApiData Quarter 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Quarter #

parseHeader :: ByteString -> Either Text Quarter #

parseQueryParam :: Text -> Either Text Quarter #

FromHttpApiData QuarterOfYear 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text QuarterOfYear #

parseHeader :: ByteString -> Either Text QuarterOfYear #

parseQueryParam :: Text -> Either Text QuarterOfYear #

FromHttpApiData DayOfWeek 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text DayOfWeek #

parseHeader :: ByteString -> Either Text DayOfWeek #

parseQueryParam :: Text -> Either Text DayOfWeek #

FromHttpApiData NominalDiffTime 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text NominalDiffTime #

parseHeader :: ByteString -> Either Text NominalDiffTime #

parseQueryParam :: Text -> Either Text NominalDiffTime #

FromHttpApiData UTCTime 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text UTCTime #

parseHeader :: ByteString -> Either Text UTCTime #

parseQueryParam :: Text -> Either Text UTCTime #

FromHttpApiData LocalTime 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text LocalTime #

parseHeader :: ByteString -> Either Text LocalTime #

parseQueryParam :: Text -> Either Text LocalTime #

FromHttpApiData TimeOfDay 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text TimeOfDay #

parseHeader :: ByteString -> Either Text TimeOfDay #

parseQueryParam :: Text -> Either Text TimeOfDay #

FromHttpApiData ZonedTime 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text ZonedTime #

parseHeader :: ByteString -> Either Text ZonedTime #

parseQueryParam :: Text -> Either Text ZonedTime #

FromHttpApiData UUID 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text UUID #

parseHeader :: ByteString -> Either Text UUID #

parseQueryParam :: Text -> Either Text UUID #

FromHttpApiData String 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text String #

parseHeader :: ByteString -> Either Text String #

parseQueryParam :: Text -> Either Text String #

FromHttpApiData Integer 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Integer #

parseHeader :: ByteString -> Either Text Integer #

parseQueryParam :: Text -> Either Text Integer #

FromHttpApiData Natural 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Natural #

parseHeader :: ByteString -> Either Text Natural #

parseQueryParam :: Text -> Either Text Natural #

FromHttpApiData () 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text () #

parseHeader :: ByteString -> Either Text () #

parseQueryParam :: Text -> Either Text () #

FromHttpApiData Bool 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Bool #

parseHeader :: ByteString -> Either Text Bool #

parseQueryParam :: Text -> Either Text Bool #

FromHttpApiData Char 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Char #

parseHeader :: ByteString -> Either Text Char #

parseQueryParam :: Text -> Either Text Char #

FromHttpApiData Double 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Double #

parseHeader :: ByteString -> Either Text Double #

parseQueryParam :: Text -> Either Text Double #

FromHttpApiData Float 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Float #

parseHeader :: ByteString -> Either Text Float #

parseQueryParam :: Text -> Either Text Float #

FromHttpApiData Int 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Int #

parseHeader :: ByteString -> Either Text Int #

parseQueryParam :: Text -> Either Text Int #

FromHttpApiData Word 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text Word #

parseHeader :: ByteString -> Either Text Word #

parseQueryParam :: Text -> Either Text Word #

FromHttpApiData a => FromHttpApiData (Identity a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (Identity a) #

parseHeader :: ByteString -> Either Text (Identity a) #

parseQueryParam :: Text -> Either Text (Identity a) #

FromHttpApiData a => FromHttpApiData (First a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (First a) #

parseHeader :: ByteString -> Either Text (First a) #

parseQueryParam :: Text -> Either Text (First a) #

FromHttpApiData a => FromHttpApiData (Last a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (Last a) #

parseHeader :: ByteString -> Either Text (Last a) #

parseQueryParam :: Text -> Either Text (Last a) #

FromHttpApiData a => FromHttpApiData (First a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (First a) #

parseHeader :: ByteString -> Either Text (First a) #

parseQueryParam :: Text -> Either Text (First a) #

FromHttpApiData a => FromHttpApiData (Last a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (Last a) #

parseHeader :: ByteString -> Either Text (Last a) #

parseQueryParam :: Text -> Either Text (Last a) #

FromHttpApiData a => FromHttpApiData (Max a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (Max a) #

parseHeader :: ByteString -> Either Text (Max a) #

parseQueryParam :: Text -> Either Text (Max a) #

FromHttpApiData a => FromHttpApiData (Min a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (Min a) #

parseHeader :: ByteString -> Either Text (Min a) #

parseQueryParam :: Text -> Either Text (Min a) #

FromHttpApiData a => FromHttpApiData (Dual a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (Dual a) #

parseHeader :: ByteString -> Either Text (Dual a) #

parseQueryParam :: Text -> Either Text (Dual a) #

FromHttpApiData a => FromHttpApiData (Product a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (Product a) #

parseHeader :: ByteString -> Either Text (Product a) #

parseQueryParam :: Text -> Either Text (Product a) #

FromHttpApiData a => FromHttpApiData (Sum a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (Sum a) #

parseHeader :: ByteString -> Either Text (Sum a) #

parseQueryParam :: Text -> Either Text (Sum a) #

FromHttpApiData a => FromHttpApiData (LenientData a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (LenientData a) #

parseHeader :: ByteString -> Either Text (LenientData a) #

parseQueryParam :: Text -> Either Text (LenientData a) #

FromHttpApiData a => FromHttpApiData (Maybe a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (Maybe a) #

parseHeader :: ByteString -> Either Text (Maybe a) #

parseQueryParam :: Text -> Either Text (Maybe a) #

(FromHttpApiData a, FromHttpApiData b) => FromHttpApiData (Either a b) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (Either a b) #

parseHeader :: ByteString -> Either Text (Either a b) #

parseQueryParam :: Text -> Either Text (Either a b) #

HasResolution a => FromHttpApiData (Fixed a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (Fixed a) #

parseHeader :: ByteString -> Either Text (Fixed a) #

parseQueryParam :: Text -> Either Text (Fixed a) #

FromHttpApiData a => FromHttpApiData (Const a b) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (Const a b) #

parseHeader :: ByteString -> Either Text (Const a b) #

parseQueryParam :: Text -> Either Text (Const a b) #

FromHttpApiData a => FromHttpApiData (Tagged b a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

parseUrlPiece :: Text -> Either Text (Tagged b a) #

parseHeader :: ByteString -> Either Text (Tagged b a) #

parseQueryParam :: Text -> Either Text (Tagged b a) #

class ToHttpApiData a where #

Minimal complete definition

toUrlPiece | toQueryParam

Methods

toUrlPiece :: a -> Text #

toEncodedUrlPiece :: a -> Builder #

toHeader :: a -> ByteString #

toQueryParam :: a -> Text #

toEncodedQueryParam :: a -> Builder #

Instances

Instances details
ToHttpApiData All 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: All -> Text #

toEncodedUrlPiece :: All -> Builder #

toHeader :: All -> ByteString #

toQueryParam :: All -> Text #

toEncodedQueryParam :: All -> Builder #

ToHttpApiData Any 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Any -> Text #

toEncodedUrlPiece :: Any -> Builder #

toHeader :: Any -> ByteString #

toQueryParam :: Any -> Text #

toEncodedQueryParam :: Any -> Builder #

ToHttpApiData Version 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Version -> Text #

toEncodedUrlPiece :: Version -> Builder #

toHeader :: Version -> ByteString #

toQueryParam :: Version -> Text #

toEncodedQueryParam :: Version -> Builder #

ToHttpApiData Void 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Void -> Text #

toEncodedUrlPiece :: Void -> Builder #

toHeader :: Void -> ByteString #

toQueryParam :: Void -> Text #

toEncodedQueryParam :: Void -> Builder #

ToHttpApiData Int16 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Int16 -> Text #

toEncodedUrlPiece :: Int16 -> Builder #

toHeader :: Int16 -> ByteString #

toQueryParam :: Int16 -> Text #

toEncodedQueryParam :: Int16 -> Builder #

ToHttpApiData Int32 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Int32 -> Text #

toEncodedUrlPiece :: Int32 -> Builder #

toHeader :: Int32 -> ByteString #

toQueryParam :: Int32 -> Text #

toEncodedQueryParam :: Int32 -> Builder #

ToHttpApiData Int64 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Int64 -> Text #

toEncodedUrlPiece :: Int64 -> Builder #

toHeader :: Int64 -> ByteString #

toQueryParam :: Int64 -> Text #

toEncodedQueryParam :: Int64 -> Builder #

ToHttpApiData Int8 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Int8 -> Text #

toEncodedUrlPiece :: Int8 -> Builder #

toHeader :: Int8 -> ByteString #

toQueryParam :: Int8 -> Text #

toEncodedQueryParam :: Int8 -> Builder #

ToHttpApiData Word16 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Word16 -> Text #

toEncodedUrlPiece :: Word16 -> Builder #

toHeader :: Word16 -> ByteString #

toQueryParam :: Word16 -> Text #

toEncodedQueryParam :: Word16 -> Builder #

ToHttpApiData Word32 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Word32 -> Text #

toEncodedUrlPiece :: Word32 -> Builder #

toHeader :: Word32 -> ByteString #

toQueryParam :: Word32 -> Text #

toEncodedQueryParam :: Word32 -> Builder #

ToHttpApiData Word64 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Word64 -> Text #

toEncodedUrlPiece :: Word64 -> Builder #

toHeader :: Word64 -> ByteString #

toQueryParam :: Word64 -> Text #

toEncodedQueryParam :: Word64 -> Builder #

ToHttpApiData Word8 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Word8 -> Text #

toEncodedUrlPiece :: Word8 -> Builder #

toHeader :: Word8 -> ByteString #

toQueryParam :: Word8 -> Text #

toEncodedQueryParam :: Word8 -> Builder #

ToHttpApiData SetCookie 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: SetCookie -> Text #

toEncodedUrlPiece :: SetCookie -> Builder #

toHeader :: SetCookie -> ByteString #

toQueryParam :: SetCookie -> Text #

toEncodedQueryParam :: SetCookie -> Builder #

ToHttpApiData Ordering 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Ordering -> Text #

toEncodedUrlPiece :: Ordering -> Builder #

toHeader :: Ordering -> ByteString #

toQueryParam :: Ordering -> Text #

toEncodedQueryParam :: Ordering -> Builder #

ToHttpApiData Link 
Instance details

Defined in Servant.Links

Methods

toUrlPiece :: Link -> Text #

toEncodedUrlPiece :: Link -> Builder #

toHeader :: Link -> ByteString #

toQueryParam :: Link -> Text #

toEncodedQueryParam :: Link -> Builder #

ToHttpApiData Text 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Text -> Text #

toEncodedUrlPiece :: Text -> Builder #

toHeader :: Text -> ByteString #

toQueryParam :: Text -> Text #

toEncodedQueryParam :: Text -> Builder #

ToHttpApiData Text 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Text -> Text #

toEncodedUrlPiece :: Text -> Builder #

toHeader :: Text -> ByteString #

toQueryParam :: Text -> Text #

toEncodedQueryParam :: Text -> Builder #

ToHttpApiData Day 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Day -> Text #

toEncodedUrlPiece :: Day -> Builder #

toHeader :: Day -> ByteString #

toQueryParam :: Day -> Text #

toEncodedQueryParam :: Day -> Builder #

ToHttpApiData Month 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Month -> Text #

toEncodedUrlPiece :: Month -> Builder #

toHeader :: Month -> ByteString #

toQueryParam :: Month -> Text #

toEncodedQueryParam :: Month -> Builder #

ToHttpApiData Quarter 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Quarter -> Text #

toEncodedUrlPiece :: Quarter -> Builder #

toHeader :: Quarter -> ByteString #

toQueryParam :: Quarter -> Text #

toEncodedQueryParam :: Quarter -> Builder #

ToHttpApiData QuarterOfYear 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: QuarterOfYear -> Text #

toEncodedUrlPiece :: QuarterOfYear -> Builder #

toHeader :: QuarterOfYear -> ByteString #

toQueryParam :: QuarterOfYear -> Text #

toEncodedQueryParam :: QuarterOfYear -> Builder #

ToHttpApiData DayOfWeek 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: DayOfWeek -> Text #

toEncodedUrlPiece :: DayOfWeek -> Builder #

toHeader :: DayOfWeek -> ByteString #

toQueryParam :: DayOfWeek -> Text #

toEncodedQueryParam :: DayOfWeek -> Builder #

ToHttpApiData NominalDiffTime 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: NominalDiffTime -> Text #

toEncodedUrlPiece :: NominalDiffTime -> Builder #

toHeader :: NominalDiffTime -> ByteString #

toQueryParam :: NominalDiffTime -> Text #

toEncodedQueryParam :: NominalDiffTime -> Builder #

ToHttpApiData UTCTime 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: UTCTime -> Text #

toEncodedUrlPiece :: UTCTime -> Builder #

toHeader :: UTCTime -> ByteString #

toQueryParam :: UTCTime -> Text #

toEncodedQueryParam :: UTCTime -> Builder #

ToHttpApiData LocalTime 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: LocalTime -> Text #

toEncodedUrlPiece :: LocalTime -> Builder #

toHeader :: LocalTime -> ByteString #

toQueryParam :: LocalTime -> Text #

toEncodedQueryParam :: LocalTime -> Builder #

ToHttpApiData TimeOfDay 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: TimeOfDay -> Text #

toEncodedUrlPiece :: TimeOfDay -> Builder #

toHeader :: TimeOfDay -> ByteString #

toQueryParam :: TimeOfDay -> Text #

toEncodedQueryParam :: TimeOfDay -> Builder #

ToHttpApiData ZonedTime 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: ZonedTime -> Text #

toEncodedUrlPiece :: ZonedTime -> Builder #

toHeader :: ZonedTime -> ByteString #

toQueryParam :: ZonedTime -> Text #

toEncodedQueryParam :: ZonedTime -> Builder #

ToHttpApiData UUID 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: UUID -> Text #

toEncodedUrlPiece :: UUID -> Builder #

toHeader :: UUID -> ByteString #

toQueryParam :: UUID -> Text #

toEncodedQueryParam :: UUID -> Builder #

ToHttpApiData String 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: String -> Text #

toEncodedUrlPiece :: String -> Builder #

toHeader :: String -> ByteString #

toQueryParam :: String -> Text #

toEncodedQueryParam :: String -> Builder #

ToHttpApiData Integer 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Integer -> Text #

toEncodedUrlPiece :: Integer -> Builder #

toHeader :: Integer -> ByteString #

toQueryParam :: Integer -> Text #

toEncodedQueryParam :: Integer -> Builder #

ToHttpApiData Natural 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Natural -> Text #

toEncodedUrlPiece :: Natural -> Builder #

toHeader :: Natural -> ByteString #

toQueryParam :: Natural -> Text #

toEncodedQueryParam :: Natural -> Builder #

ToHttpApiData () 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: () -> Text #

toEncodedUrlPiece :: () -> Builder #

toHeader :: () -> ByteString #

toQueryParam :: () -> Text #

toEncodedQueryParam :: () -> Builder #

ToHttpApiData Bool 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Bool -> Text #

toEncodedUrlPiece :: Bool -> Builder #

toHeader :: Bool -> ByteString #

toQueryParam :: Bool -> Text #

toEncodedQueryParam :: Bool -> Builder #

ToHttpApiData Char 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Char -> Text #

toEncodedUrlPiece :: Char -> Builder #

toHeader :: Char -> ByteString #

toQueryParam :: Char -> Text #

toEncodedQueryParam :: Char -> Builder #

ToHttpApiData Double 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Double -> Text #

toEncodedUrlPiece :: Double -> Builder #

toHeader :: Double -> ByteString #

toQueryParam :: Double -> Text #

toEncodedQueryParam :: Double -> Builder #

ToHttpApiData Float 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Float -> Text #

toEncodedUrlPiece :: Float -> Builder #

toHeader :: Float -> ByteString #

toQueryParam :: Float -> Text #

toEncodedQueryParam :: Float -> Builder #

ToHttpApiData Int 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Int -> Text #

toEncodedUrlPiece :: Int -> Builder #

toHeader :: Int -> ByteString #

toQueryParam :: Int -> Text #

toEncodedQueryParam :: Int -> Builder #

ToHttpApiData Word 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Word -> Text #

toEncodedUrlPiece :: Word -> Builder #

toHeader :: Word -> ByteString #

toQueryParam :: Word -> Text #

toEncodedQueryParam :: Word -> Builder #

ToHttpApiData a => ToHttpApiData (Identity a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Identity a -> Text #

toEncodedUrlPiece :: Identity a -> Builder #

toHeader :: Identity a -> ByteString #

toQueryParam :: Identity a -> Text #

toEncodedQueryParam :: Identity a -> Builder #

ToHttpApiData a => ToHttpApiData (First a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: First a -> Text #

toEncodedUrlPiece :: First a -> Builder #

toHeader :: First a -> ByteString #

toQueryParam :: First a -> Text #

toEncodedQueryParam :: First a -> Builder #

ToHttpApiData a => ToHttpApiData (Last a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Last a -> Text #

toEncodedUrlPiece :: Last a -> Builder #

toHeader :: Last a -> ByteString #

toQueryParam :: Last a -> Text #

toEncodedQueryParam :: Last a -> Builder #

ToHttpApiData a => ToHttpApiData (First a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: First a -> Text #

toEncodedUrlPiece :: First a -> Builder #

toHeader :: First a -> ByteString #

toQueryParam :: First a -> Text #

toEncodedQueryParam :: First a -> Builder #

ToHttpApiData a => ToHttpApiData (Last a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Last a -> Text #

toEncodedUrlPiece :: Last a -> Builder #

toHeader :: Last a -> ByteString #

toQueryParam :: Last a -> Text #

toEncodedQueryParam :: Last a -> Builder #

ToHttpApiData a => ToHttpApiData (Max a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Max a -> Text #

toEncodedUrlPiece :: Max a -> Builder #

toHeader :: Max a -> ByteString #

toQueryParam :: Max a -> Text #

toEncodedQueryParam :: Max a -> Builder #

ToHttpApiData a => ToHttpApiData (Min a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Min a -> Text #

toEncodedUrlPiece :: Min a -> Builder #

toHeader :: Min a -> ByteString #

toQueryParam :: Min a -> Text #

toEncodedQueryParam :: Min a -> Builder #

ToHttpApiData a => ToHttpApiData (Dual a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Dual a -> Text #

toEncodedUrlPiece :: Dual a -> Builder #

toHeader :: Dual a -> ByteString #

toQueryParam :: Dual a -> Text #

toEncodedQueryParam :: Dual a -> Builder #

ToHttpApiData a => ToHttpApiData (Product a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Product a -> Text #

toEncodedUrlPiece :: Product a -> Builder #

toHeader :: Product a -> ByteString #

toQueryParam :: Product a -> Text #

toEncodedQueryParam :: Product a -> Builder #

ToHttpApiData a => ToHttpApiData (Sum a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Sum a -> Text #

toEncodedUrlPiece :: Sum a -> Builder #

toHeader :: Sum a -> ByteString #

toQueryParam :: Sum a -> Text #

toEncodedQueryParam :: Sum a -> Builder #

ToHttpApiData a => ToHttpApiData (Maybe a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Maybe a -> Text #

toEncodedUrlPiece :: Maybe a -> Builder #

toHeader :: Maybe a -> ByteString #

toQueryParam :: Maybe a -> Text #

toEncodedQueryParam :: Maybe a -> Builder #

(ToHttpApiData a, ToHttpApiData b) => ToHttpApiData (Either a b) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Either a b -> Text #

toEncodedUrlPiece :: Either a b -> Builder #

toHeader :: Either a b -> ByteString #

toQueryParam :: Either a b -> Text #

toEncodedQueryParam :: Either a b -> Builder #

HasResolution a => ToHttpApiData (Fixed a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Fixed a -> Text #

toEncodedUrlPiece :: Fixed a -> Builder #

toHeader :: Fixed a -> ByteString #

toQueryParam :: Fixed a -> Text #

toEncodedQueryParam :: Fixed a -> Builder #

ToHttpApiData a => ToHttpApiData (Const a b) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Const a b -> Text #

toEncodedUrlPiece :: Const a b -> Builder #

toHeader :: Const a b -> ByteString #

toQueryParam :: Const a b -> Text #

toEncodedQueryParam :: Const a b -> Builder #

ToHttpApiData a => ToHttpApiData (Tagged b a) 
Instance details

Defined in Web.Internal.HttpApiData

Methods

toUrlPiece :: Tagged b a -> Text #

toEncodedUrlPiece :: Tagged b a -> Builder #

toHeader :: Tagged b a -> ByteString #

toQueryParam :: Tagged b a -> Text #

toEncodedQueryParam :: Tagged b a -> Builder #

data URI #

Constructors

URI 

Fields

Instances

Instances details
Data URI 
Instance details

Defined in Network.URI

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> URI -> c URI

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c URI

toConstr :: URI -> Constr

dataTypeOf :: URI -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c URI)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URI)

gmapT :: (forall b. Data b => b -> b) -> URI -> URI

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> URI -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> URI -> r

gmapQ :: (forall d. Data d => d -> u) -> URI -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> URI -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> URI -> m URI

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> URI -> m URI

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> URI -> m URI

Generic URI 
Instance details

Defined in Network.URI

Associated Types

type Rep URI 
Instance details

Defined in Network.URI

type Rep URI = D1 ('MetaData "URI" "Network.URI" "network-uri-2.6.4.2-HhmakPIsVtyLAPVmN25QSY" 'False) (C1 ('MetaCons "URI" 'PrefixI 'True) ((S1 ('MetaSel ('Just "uriScheme") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "uriAuthority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe URIAuth))) :*: (S1 ('MetaSel ('Just "uriPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Just "uriQuery") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "uriFragment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))))

Methods

from :: URI -> Rep URI x

to :: Rep URI x -> URI

Show URI 
Instance details

Defined in Network.URI

Methods

showsPrec :: Int -> URI -> ShowS

show :: URI -> String

showList :: [URI] -> ShowS

NFData URI 
Instance details

Defined in Network.URI

Methods

rnf :: URI -> ()

Eq URI 
Instance details

Defined in Network.URI

Methods

(==) :: URI -> URI -> Bool

(/=) :: URI -> URI -> Bool

Ord URI 
Instance details

Defined in Network.URI

Methods

compare :: URI -> URI -> Ordering

(<) :: URI -> URI -> Bool

(<=) :: URI -> URI -> Bool

(>) :: URI -> URI -> Bool

(>=) :: URI -> URI -> Bool

max :: URI -> URI -> URI

min :: URI -> URI -> URI

Lift URI 
Instance details

Defined in Network.URI

Methods

lift :: Quote m => URI -> m Exp

liftTyped :: forall (m :: Type -> Type). Quote m => URI -> Code m URI

type Rep URI 
Instance details

Defined in Network.URI

type Rep URI = D1 ('MetaData "URI" "Network.URI" "network-uri-2.6.4.2-HhmakPIsVtyLAPVmN25QSY" 'False) (C1 ('MetaCons "URI" 'PrefixI 'True) ((S1 ('MetaSel ('Just "uriScheme") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "uriAuthority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe URIAuth))) :*: (S1 ('MetaSel ('Just "uriPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Just "uriQuery") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "uriFragment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))))

data SBool (b :: Bool) where #

Constructors

STrue :: SBool 'True 
SFalse :: SBool 'False 

Instances

Instances details
EqP SBool 
Instance details

Defined in Data.Singletons.Bool

Methods

eqp :: forall (a :: Bool) (b :: Bool). SBool a -> SBool b -> Bool

GNFData SBool 
Instance details

Defined in Data.Singletons.Bool

Methods

grnf :: forall (a :: Bool). SBool a -> ()

GCompare SBool 
Instance details

Defined in Data.Singletons.Bool

Methods

gcompare :: forall (a :: Bool) (b :: Bool). SBool a -> SBool b -> GOrdering a b

GEq SBool 
Instance details

Defined in Data.Singletons.Bool

Methods

geq :: forall (a :: Bool) (b :: Bool). SBool a -> SBool b -> Maybe (a :~: b)

GRead SBool 
Instance details

Defined in Data.Singletons.Bool

Methods

greadsPrec :: Int -> GReadS SBool

GShow SBool 
Instance details

Defined in Data.Singletons.Bool

Methods

gshowsPrec :: forall (a :: Bool). Int -> SBool a -> ShowS

OrdP SBool 
Instance details

Defined in Data.Singletons.Bool

Methods

comparep :: forall (a :: Bool) (b :: Bool). SBool a -> SBool b -> Ordering

Show (SBool b) 
Instance details

Defined in Data.Singletons.Bool

Methods

showsPrec :: Int -> SBool b -> ShowS

show :: SBool b -> String

showList :: [SBool b] -> ShowS

SBoolI b => Boring (SBool b) 
Instance details

Defined in Data.Singletons.Bool

Methods

boring :: SBool b

NFData (SBool b) 
Instance details

Defined in Data.Singletons.Bool

Methods

rnf :: SBool b -> ()

Eq (SBool b) 
Instance details

Defined in Data.Singletons.Bool

Methods

(==) :: SBool b -> SBool b -> Bool

(/=) :: SBool b -> SBool b -> Bool

Ord (SBool b) 
Instance details

Defined in Data.Singletons.Bool

Methods

compare :: SBool b -> SBool b -> Ordering

(<) :: SBool b -> SBool b -> Bool

(<=) :: SBool b -> SBool b -> Bool

(>) :: SBool b -> SBool b -> Bool

(>=) :: SBool b -> SBool b -> Bool

max :: SBool b -> SBool b -> SBool b

min :: SBool b -> SBool b -> SBool b

class SBoolI (b :: Bool) where #

Methods

sbool :: SBool b #

Instances

Instances details
SBoolI 'False 
Instance details

Defined in Data.Singletons.Bool

Methods

sbool :: SBool 'False #

SBoolI 'True 
Instance details

Defined in Data.Singletons.Bool

Methods

sbool :: SBool 'True #