| Copyright | (c) Frederick Pringle 2025 |
|---|---|
| License | BSD-3-Clause |
| Maintainer | freddyjepringle@gmail.com |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Servant.API.Routes.Internal.Header
Description
Internal module, subject to change.
Synopsis
- data HeaderRep = HeaderRep {}
- mkHeaderRep :: forall sym a. (KnownSymbol sym, Typeable a) => HeaderRep
- class GetHeaderReps (hs :: [Type]) where
- getHeaderReps :: [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.
Instances
| ToJSON HeaderRep Source # | |
| Show HeaderRep Source # | |
| Eq HeaderRep Source # | |
| Ord HeaderRep Source # | |
Defined in Servant.API.Routes.Internal.Header | |
mkHeaderRep :: forall sym a. (KnownSymbol sym, Typeable a) => HeaderRep Source #
class GetHeaderReps (hs :: [Type]) where Source #
Utility class to let us get a value-level list of HeaderReps from a
type-level list of Headers. See the implementation of
for an example.HasRoutes (Verb method status ctypes (Headers hs a))
Methods
getHeaderReps :: [HeaderRep] Source #
Instances
| GetHeaderReps ('[] :: [Type]) Source # | |
Defined in Servant.API.Routes.Internal.Header Methods getHeaderReps :: [HeaderRep] Source # | |
| (GetHeaderReps rest, KnownSymbol h, Typeable v) => GetHeaderReps (Header h v ': rest) Source # | |
Defined in Servant.API.Routes.Internal.Header Methods getHeaderReps :: [HeaderRep] Source # | |