Copyright | (c) Frederick Pringle 2024 |
---|---|
License | BSD-3-Clause |
Maintainer | freddyjepringle@gmail.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Simple representation of HTTP headers.
Synopsis
- data HeaderRep
- class GetHeaderReps (hs :: [Type]) where
- getHeaderReps :: [HeaderRep]
- mkHeaderRep :: forall sym a. (KnownSymbol sym, Typeable a) => HeaderRep
Documentation
Simple term-level representation of a Header
.
A type-level
should correspond to
Header
(sym :: Symbol
) typ
, where HeaderRep
{ _hName = str, _hType = typRep }str
is the term-level equivalent
of sym
and typRep
is the term-level representation of typ
.
class GetHeaderReps (hs :: [Type]) where Source #
Utility class to let us get a value-level list of HeaderRep
s from a
type-level list of Header
s. See the implementation of
for an example.HasRoutes
(Verb
method status ctypes (Headers
hs a))
getHeaderReps :: [HeaderRep] Source #
Instances
GetHeaderReps ('[] :: [Type]) Source # | |
Defined in Servant.API.Routes.Header getHeaderReps :: [HeaderRep] Source # | |
(GetHeaderReps rest, KnownSymbol h, Typeable v) => GetHeaderReps (Header h v ': rest) Source # | |
Defined in Servant.API.Routes.Header getHeaderReps :: [HeaderRep] Source # |
mkHeaderRep :: forall sym a. (KnownSymbol sym, Typeable a) => HeaderRep Source #