Safe Haskell | None |
---|---|
Language | Haskell2010 |
Servant
Synopsis
- data UVerb (method :: StdMethod) (contentTypes :: [Type]) (as :: [Type])
- data (path :: k) :> a
- data BasicAuth (realm :: Symbol) userData
- type Header = Header' '[Optional, Strict]
- data ResponseHeader (sym :: Symbol) a
- = Header a
- | MissingHeader
- | UndecodableHeader ByteString
- data a :<|> b = a :<|> b
- class Accept (ctype :: k) where
- contentType :: Proxy ctype -> MediaType
- contentTypes :: Proxy ctype -> NonEmpty MediaType
- data Capture' (mods :: [Type]) (sym :: Symbol) a
- data CaptureAll (sym :: Symbol) a
- data DeepQuery (sym :: Symbol) a
- data Description (sym :: Symbol)
- data EmptyAPI = EmptyAPI
- data Fragment a
- class FramingRender (strategy :: k) where
- framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy strategy -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString
- class FramingUnrender (strategy :: k) where
- framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy strategy -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a
- class FromSourceIO chunk a | a -> chunk where
- fromSourceIO :: SourceIO chunk -> IO a
- data Header' (mods :: [Type]) (sym :: Symbol) a
- type family If (cond :: Bool) (tru :: k) (fls :: k) :: k where ...
- data IsSecure
- data NoContentVerb (method :: k1)
- data QueryFlag (sym :: Symbol)
- data QueryParam' (mods :: [Type]) (sym :: Symbol) a
- data QueryParams (sym :: Symbol) a
- data QueryString
- data Raw
- data RawM
- class ReflectMethod (a :: k) where
- reflectMethod :: Proxy a -> Method
- data RemoteHost
- data ReqBody' (mods :: [Type]) (contentTypes :: [Type]) a
- data SBool (b :: Bool) where
- class SBoolI (b :: Bool) where
- type SourceIO = SourceT IO
- data Stream (method :: k1) (status :: Nat) framing contentType a
- data StreamBody' (mods :: [Type]) framing contentType a
- data Summary (sym :: Symbol)
- class ToSourceIO chunk a | a -> chunk where
- toSourceIO :: a -> SourceIO chunk
- type Vault = Vault RealWorld
- data Verb (method :: k1) (statusCode :: Nat) (contentTypes :: [Type]) a
- data WithNamedContext (name :: Symbol) (subContext :: [Type]) (subApi :: k)
- data WithResource (res :: k)
- data NamedRoutes (api :: Type -> Type)
- class GenericMode (mode :: k) where
- type (mode :: k) :- api
- type ToServant (routes :: k -> Type) (mode :: k) = GToServant (Rep (routes mode))
- type ToServantApi (routes :: Type -> Type) = ToServant routes AsApi
- class GServantProduct (f :: k -> Type)
- toServant :: forall {k} routes (mode :: k). GenericServant routes mode => routes mode -> ToServant routes mode
- fromServant :: forall {k} routes (mode :: k). GenericServant routes mode => ToServant routes mode -> routes mode
- class Accept ctype => MimeRender (ctype :: k) a where
- mimeRender :: Proxy ctype -> a -> ByteString
- class Accept ctype => MimeUnrender (ctype :: k) a where
- mimeUnrender :: Proxy ctype -> ByteString -> Either String a
- mimeUnrenderWithType :: Proxy ctype -> MediaType -> ByteString -> Either String a
- data NoContent = NoContent
- class GetHeaders ls where
- getHeaders :: ls -> [Header]
- data Headers (ls :: [Type]) a = Headers {
- getResponse :: a
- getHeadersHList :: HList ls
- class FromHttpApiData a where
- parseUrlPiece :: Text -> Either Text a
- parseHeader :: ByteString -> Either Text a
- parseQueryParam :: Text -> Either Text a
- data BasicAuthData = BasicAuthData {
- basicAuthUsername :: !ByteString
- basicAuthPassword :: !ByteString
- type Capture = Capture' ('[] :: [Type])
- type ReqBody = ReqBody' '[Required, Strict]
- class KnownStatus (StatusOf a) => HasStatus a where
- type StatusOf a :: Nat
- type IsMember (a :: u) (as :: [u]) = (Unique as, CheckElemIsMember a as, UElem a as)
- type family Statuses (as :: [Type]) :: [Nat]
- type family Statuses (as :: [Type]) :: [Nat]
- type Union = NS I
- type family Unique (xs :: [k]) where ...
- newtype WithStatus (k :: Nat) a = WithStatus a
- inject :: UElem x xs => f x -> NS f xs
- statusOf :: HasStatus a => proxy a -> Status
- data StdMethod
- data HttpVersion = HttpVersion {}
- type Get = Verb 'GET 200
- type Put = Verb 'PUT 200
- data Strict
- data FormUrlEncoded
- data JSON
- data OctetStream
- data PlainText
- data AuthProtect (tag :: k)
- type family (mode :: k) :- api
- data AsApi
- type GenericServant (routes :: k -> Type) (mode :: k) = (GenericMode mode, Generic (routes mode), GServantProduct (Rep (routes mode)))
- genericApi :: forall (routes :: Type -> Type). GenericServant routes AsApi => Proxy routes -> Proxy (ToServantApi routes)
- data Lenient
- data Optional
- data Required
- type QueryParam = QueryParam' '[Optional, Strict]
- class AddHeader (mods :: [Type]) (h :: Symbol) v orig new | mods h v orig -> new, new -> mods, new -> h, new -> v, new -> orig
- class BuildHeadersTo (hs :: [Type]) where
- buildHeadersTo :: [Header] -> HList hs
- data HList (a :: [Type]) where
- class HasResponseHeader (h :: Symbol) a (headers :: [Type])
- 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
- data NetstringFraming
- data NewlineFraming
- data NoFraming
- type StreamBody = StreamBody' ('[] :: [Type])
- type StreamGet = Stream 'GET 200
- type StreamPost = Stream 'POST 200
- type family IsElem endpoint api where ...
- type family IsElem' a s
- type family StatusOf a :: Nat
- type Delete = Verb 'DELETE 200
- type DeleteAccepted = Verb 'DELETE 202
- type DeleteNoContent = NoContentVerb 'DELETE
- type DeleteNonAuthoritative = Verb 'DELETE 203
- type GetAccepted = Verb 'GET 202
- type GetNoContent = NoContentVerb 'GET
- type GetNonAuthoritative = Verb 'GET 203
- type GetPartialContent = Verb 'GET 206
- type GetResetContent = Verb 'GET 205
- type Patch = Verb 'PATCH 200
- type PatchAccepted = Verb 'PATCH 202
- type PatchNoContent = NoContentVerb 'PATCH
- type PatchNonAuthoritative = Verb 'PATCH 203
- type Post = Verb 'POST 200
- type PostAccepted = Verb 'POST 202
- type PostCreated = Verb 'POST 201
- type PostNoContent = NoContentVerb 'POST
- type PostNonAuthoritative = Verb 'POST 203
- type PostResetContent = Verb 'POST 205
- type PutAccepted = Verb 'PUT 202
- type PutCreated = Verb 'PUT 201
- type PutNoContent = NoContentVerb 'PUT
- type PutNonAuthoritative = Verb 'PUT 203
- class HasLink (endpoint :: k) where
- data Link
- type family MkLink (endpoint :: k) a
- safeLink :: (IsElem endpoint api, HasLink endpoint) => Proxy api -> Proxy endpoint -> MkLink endpoint Link
- class ToHttpApiData a where
- toUrlPiece :: a -> Text
- toEncodedUrlPiece :: a -> Builder
- toHeader :: a -> ByteString
- toQueryParam :: a -> Text
- toEncodedQueryParam :: a -> Builder
- data URI = URI {
- uriScheme :: String
- uriAuthority :: Maybe URIAuth
- uriPath :: String
- uriQuery :: String
- uriFragment :: String
- module Servant.Server
- class FragmentUnique api => AtMostOneFragment api
- type family FragmentUnique api where ...
- type family And a b where ...
- type Elem (e :: t) (es :: [t]) = ElemGo e es es
- type family IsElem endpoint api where ...
- type family IsElem' a s
- class HasLink (endpoint :: k) where
- data Link
- type family MkLink (endpoint :: k) a
- safeLink :: (IsElem endpoint api, HasLink endpoint) => Proxy api -> Proxy endpoint -> MkLink endpoint Link
- data URI = URI {
- uriScheme :: String
- uriAuthority :: Maybe URIAuth
- uriPath :: String
- uriQuery :: String
- uriFragment :: String
- type family AllIsElem (xs :: [Type]) api where ...
- type family AllIsIn (xs :: [Type]) api where ...
- type family AppendList (xs :: [a]) (ys :: [a]) :: [a] where ...
- type family ElemGo (e :: t) (es :: [t]) (orig :: t1) where ...
- type family Endpoints api :: [Type] where ...
- type family IsIn endpoint api where ...
- type family IsStrictSubAPI sub api where ...
- type family IsSubAPI sub api where ...
- type family IsSubList (a :: [t]) (b :: [t]) where ...
- type family MapSub (e :: k) (xs :: [Type]) :: [Type] where ...
- type family Or a b where ...
- data LinkArrayElementStyle
- data AsLink a
- data Param
- = SingleParam String Text
- | ArrayElemParam String Text
- | FlagParam String
- allFieldLinks :: (HasLink (ToServantApi routes), GenericServant routes (AsLink Link), ToServant routes (AsLink Link) ~ MkLink (ToServantApi routes) Link) => routes (AsLink Link)
- allFieldLinks' :: (HasLink (ToServantApi routes), GenericServant routes (AsLink a), ToServant routes (AsLink a) ~ MkLink (ToServantApi routes) a) => (Link -> a) -> routes (AsLink a)
- allLinks :: forall {k} (api :: k). HasLink api => Proxy api -> MkLink api Link
- allLinks' :: forall {k} (api :: k) a. HasLink api => (Link -> a) -> Proxy api -> MkLink api a
- fieldLink :: (IsElem endpoint (ToServantApi routes), HasLink endpoint, GenericServant routes AsApi) => (routes AsApi -> endpoint) -> MkLink endpoint Link
- fieldLink' :: forall routes endpoint a. (IsElem endpoint (ToServantApi routes), HasLink endpoint, GenericServant routes AsApi) => (Link -> a) -> (routes AsApi -> endpoint) -> MkLink endpoint a
- linkFragment :: Link -> Fragment'
- linkQueryParams :: Link -> [Param]
- linkSegments :: Link -> [String]
- linkURI :: Link -> URI
- linkURI' :: LinkArrayElementStyle -> Link -> URI
- safeLink' :: (IsElem endpoint api, HasLink endpoint) => (Link -> a) -> Proxy api -> Proxy endpoint -> MkLink endpoint a
- module Servant.Server.StaticFiles
- data Proxy (t :: k) = Proxy
- throwError :: MonadError e m => e -> m a
Documentation
This module and its submodules can be used to define servant APIs. Note that these API definitions don't directly implement a server (or anything else).
data UVerb (method :: StdMethod) (contentTypes :: [Type]) (as :: [Type]) #
Instances
HasLink (UVerb m ct a :: Type) | |
(ReflectMethod method, AllMime contentTypes, All (IsServerResourceWithStatus contentTypes) as, Unique (Statuses as)) => HasServer (UVerb method contentTypes as :: Type) context Source # | |
Defined in Servant.Server.UVerb Methods route :: Proxy (UVerb method contentTypes as) -> Context context -> Delayed env (Server (UVerb method contentTypes as)) -> Router env Source # hoistServerWithContext :: Proxy (UVerb method contentTypes as) -> Proxy context -> (forall x. m x -> n x) -> ServerT (UVerb method contentTypes as) m -> ServerT (UVerb method contentTypes as) n Source # | |
AtMostOneFragment (UVerb m cts as) | |
Defined in Servant.API.TypeLevel | |
type MkLink (UVerb m ct a :: Type) r | |
Defined in Servant.Links | |
type ServerT (UVerb method contentTypes as :: Type) m Source # | |
Defined in Servant.Server.UVerb |
Instances
(TypeError (PartialApplication (HasLink :: Type -> Constraint) arr) :: Constraint) => HasLink (arr :> sub :: Type) | |
(KnownSymbol sym, HasLink sub) => HasLink (sym :> sub :: Type) | |
HasLink sub => HasLink (HttpVersion :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (HttpVersion :> sub) -> Link -> MkLink (HttpVersion :> sub) a # | |
HasLink sub => HasLink (BasicAuth realm a :> sub :: Type) | |
(ToHttpApiData v, HasLink sub) => HasLink (Capture' mods sym v :> sub :: Type) | |
(ToHttpApiData v, HasLink sub) => HasLink (CaptureAll sym v :> sub :: Type) | |
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) | |
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) | |
HasLink sub => HasLink (AuthProtect tag :> sub :: Type) | |
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) | |
HasLink sub => HasLink (Header' mods sym a :> sub :: Type) | |
HasLink sub => HasLink (IsSecure :> sub :: Type) | |
(KnownSymbol sym, HasLink sub) => HasLink (QueryFlag sym :> sub :: Type) | |
(KnownSymbol sym, ToHttpApiData v, HasLink sub, SBoolI (FoldRequired mods)) => HasLink (QueryParam' mods sym v :> sub :: Type) | |
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) | |
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) | |
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) | |
HasLink sub => HasLink (StreamBody' mods framing ct a :> sub :: Type) | |
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) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (WithResource res :> sub) -> Link -> MkLink (WithResource res :> sub) a # | |
HasLink sub => HasLink (Vault :> sub :: Type) | |
(TypeError (NoInstanceForSub (HasLink :: Type -> Constraint) ty) :: Constraint) => HasLink (ty :> sub :: Type) | |
(TypeError (PartialApplication (HasServer :: Type -> [Type] -> Constraint) arr) :: Constraint) => HasServer (arr :> sub :: Type) context Source # | |
(KnownSymbol path, HasServer api context) => HasServer (path :> api :: Type) context Source # | Make sure the incoming request starts with |
Defined in Servant.Server.Internal | |
HasServer api context => HasServer (HttpVersion :> api :: Type) context Source # | |
Defined in Servant.Server.Internal Methods route :: Proxy (HttpVersion :> api) -> Context context -> Delayed env (Server (HttpVersion :> api)) -> Router env Source # hoistServerWithContext :: Proxy (HttpVersion :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (HttpVersion :> api) m -> ServerT (HttpVersion :> api) n Source # | |
(KnownSymbol realm, HasServer api context, HasContextEntry context (BasicAuthCheck usr)) => HasServer (BasicAuth realm usr :> api :: Type) context Source # | Basic Authentication |
Defined in Servant.Server.Internal Methods route :: Proxy (BasicAuth realm usr :> api) -> Context context -> Delayed env (Server (BasicAuth realm usr :> api)) -> Router env Source # hoistServerWithContext :: Proxy (BasicAuth realm usr :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (BasicAuth realm usr :> api) m -> ServerT (BasicAuth realm usr :> api) n Source # | |
(KnownSymbol capture, FromHttpApiData a, Typeable a, HasServer api context, SBoolI (FoldLenient mods), HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (Capture' mods capture a :> api :: Type) context Source # | If you use You can control how it'll be converted from Example: type MyApi = "books" :> Capture "isbn" Text :> Get '[JSON] Book server :: Server MyApi server = getBook where getBook :: Text -> Handler Book getBook isbn = ... |
Defined in Servant.Server.Internal Methods route :: Proxy (Capture' mods capture a :> api) -> Context context -> Delayed env (Server (Capture' mods capture a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (Capture' mods capture a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (Capture' mods capture a :> api) m -> ServerT (Capture' mods capture a :> api) n Source # | |
(KnownSymbol capture, FromHttpApiData a, Typeable a, HasServer api context, HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (CaptureAll capture a :> api :: Type) context Source # | If you use You can control how they'll be converted from Example: type MyApi = "src" :> CaptureAll "segments" Text :> Get '[JSON] SourceFile server :: Server MyApi server = getSourceFile where getSourceFile :: [Text] -> Handler Book getSourceFile pathSegments = ... |
Defined in Servant.Server.Internal Methods route :: Proxy (CaptureAll capture a :> api) -> Context context -> Delayed env (Server (CaptureAll capture a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (CaptureAll capture a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (CaptureAll capture a :> api) m -> ServerT (CaptureAll capture a :> api) n Source # | |
HasServer api ctx => HasServer (Description desc :> api :: Type) ctx Source # | Ignore |
Defined in Servant.Server.Internal Methods route :: Proxy (Description desc :> api) -> Context ctx -> Delayed env (Server (Description desc :> api)) -> Router env Source # hoistServerWithContext :: Proxy (Description desc :> api) -> Proxy ctx -> (forall x. m x -> n x) -> ServerT (Description desc :> api) m -> ServerT (Description desc :> api) n Source # | |
HasServer api ctx => HasServer (Summary desc :> api :: Type) ctx Source # | Ignore |
Defined in Servant.Server.Internal | |
HasServer api context => HasServer (EmptyAPI :> api :: Type) context Source # | Ignore |
Defined in Servant.Server.Internal | |
(HasServer api context, HasContextEntry context (AuthHandler Request (AuthServerData (AuthProtect tag)))) => HasServer (AuthProtect tag :> api :: Type) context Source # | Known orphan instance. |
Defined in Servant.Server.Experimental.Auth Methods route :: Proxy (AuthProtect tag :> api) -> Context context -> Delayed env (Server (AuthProtect tag :> api)) -> Router env Source # hoistServerWithContext :: Proxy (AuthProtect tag :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (AuthProtect tag :> api) m -> ServerT (AuthProtect tag :> api) n Source # | |
(AtMostOneFragment api, FragmentUnique (Fragment a1 :> api), HasServer api context) => HasServer (Fragment a1 :> api :: Type) context Source # | Ignore Example: type MyApi = "books" :> Fragment Text :> Get '[JSON] [Book] server :: Server MyApi server = getBooks where getBooks :: Handler [Book] getBooks = ...return all books... |
Defined in Servant.Server.Internal Methods route :: Proxy (Fragment a1 :> api) -> Context context -> Delayed env (Server (Fragment a1 :> api)) -> Router env Source # hoistServerWithContext :: Proxy (Fragment a1 :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (Fragment a1 :> api) m -> ServerT (Fragment a1 :> api) n Source # | |
(KnownSymbol sym, FromHttpApiData a, HasServer api context, SBoolI (FoldRequired mods), SBoolI (FoldLenient mods), HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (Header' mods sym a :> api :: Type) context Source # | If you use All it asks is for a Example: newtype Referer = Referer Text deriving (Eq, Show, FromHttpApiData) -- GET /view-my-referer type MyApi = "view-my-referer" :> Header "Referer" Referer :> Get '[JSON] Referer server :: Server MyApi server = viewReferer where viewReferer :: Referer -> Handler referer viewReferer referer = return referer |
Defined in Servant.Server.Internal Methods route :: Proxy (Header' mods sym a :> api) -> Context context -> Delayed env (Server (Header' mods sym a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (Header' mods sym a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (Header' mods sym a :> api) m -> ServerT (Header' mods sym a :> api) n Source # | |
HasServer api context => HasServer (IsSecure :> api :: Type) context Source # | |
Defined in Servant.Server.Internal | |
(KnownSymbol sym, HasServer api context) => HasServer (QueryFlag sym :> api :: Type) context Source # | If you use Example: type MyApi = "books" :> QueryFlag "published" :> Get '[JSON] [Book] server :: Server MyApi server = getBooks where getBooks :: Bool -> Handler [Book] getBooks onlyPublished = ...return all books, or only the ones that are already published, depending on the argument... |
Defined in Servant.Server.Internal Methods route :: Proxy (QueryFlag sym :> api) -> Context context -> Delayed env (Server (QueryFlag sym :> api)) -> Router env Source # hoistServerWithContext :: Proxy (QueryFlag sym :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (QueryFlag sym :> api) m -> ServerT (QueryFlag sym :> api) n Source # | |
(KnownSymbol sym, FromHttpApiData a, HasServer api context, SBoolI (FoldRequired mods), SBoolI (FoldLenient mods), HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (QueryParam' mods sym a :> api :: Type) context Source # | If you use This lets servant worry about looking it up in the query string
and turning it into a value of the type you specify, enclosed
in You can control how it'll be converted from Example: type MyApi = "books" :> QueryParam "author" Text :> Get '[JSON] [Book] server :: Server MyApi server = getBooksBy where getBooksBy :: Maybe Text -> Handler [Book] getBooksBy Nothing = ...return all books... getBooksBy (Just author) = ...return books by the given author... |
Defined in Servant.Server.Internal Methods route :: Proxy (QueryParam' mods sym a :> api) -> Context context -> Delayed env (Server (QueryParam' mods sym a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (QueryParam' mods sym a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (QueryParam' mods sym a :> api) m -> ServerT (QueryParam' mods sym a :> api) n Source # | |
(KnownSymbol sym, FromHttpApiData a, HasServer api context, HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (QueryParams sym a :> api :: Type) context Source # | If you use This lets servant worry about looking up 0 or more values in the query string
associated to You can control how the individual values are converted from Example: type MyApi = "books" :> QueryParams "authors" Text :> Get '[JSON] [Book] server :: Server MyApi server = getBooksBy where getBooksBy :: [Text] -> Handler [Book] getBooksBy authors = ...return all books by these authors... |
Defined in Servant.Server.Internal Methods route :: Proxy (QueryParams sym a :> api) -> Context context -> Delayed env (Server (QueryParams sym a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (QueryParams sym a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (QueryParams sym a :> api) m -> ServerT (QueryParams sym a :> api) n Source # | |
(KnownSymbol sym, FromDeepQuery a, HasServer api context, HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (DeepQuery sym a :> api :: Type) context Source # | If you use This lets you extract an object from multiple parameters in the query string,
with its fields enclosed in brackets: `/books?filter[author][name]=value`. When
all the fields are known in advance, it can be done with The way the object is constructed from the extracted fields can be controlled by
providing an instance on Example: type MyApi = "books" :> DeepQuery "filter" BookQuery :> Get '[JSON] [Book] server :: Server MyApi server = getBooksBy where getBooksBy :: BookQuery -> Handler [Book] getBooksBy query = ...filter books based on the dynamic filters provided... |
Defined in Servant.Server.Internal Methods route :: Proxy (DeepQuery sym a :> api) -> Context context -> Delayed env (Server (DeepQuery sym a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (DeepQuery sym a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (DeepQuery sym a :> api) m -> ServerT (DeepQuery sym a :> api) n Source # | |
HasServer api context => HasServer (QueryString :> api :: Type) context Source # | If you use This lets you extract the whole query string. This is useful when the query string
can contain parameters with dynamic names, that you can't access with Example: type MyApi = "books" :> QueryString :> Get '[JSON] [Book] server :: Server MyApi server = getBooksBy where getBooksBy :: Query -> Handler [Book] getBooksBy filters = ...filter books based on the dynamic filters provided... |
Defined in Servant.Server.Internal Methods route :: Proxy (QueryString :> api) -> Context context -> Delayed env (Server (QueryString :> api)) -> Router env Source # hoistServerWithContext :: Proxy (QueryString :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (QueryString :> api) m -> ServerT (QueryString :> api) n Source # | |
HasServer api context => HasServer (RemoteHost :> api :: Type) context Source # | |
Defined in Servant.Server.Internal Methods route :: Proxy (RemoteHost :> api) -> Context context -> Delayed env (Server (RemoteHost :> api)) -> Router env Source # hoistServerWithContext :: Proxy (RemoteHost :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (RemoteHost :> api) m -> ServerT (RemoteHost :> api) n Source # | |
(AllCTUnrender list a, HasServer api context, SBoolI (FoldLenient mods), HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (ReqBody' mods list a :> api :: Type) context Source # | If you use All it asks is for a Example: type MyApi = "books" :> ReqBody '[JSON] Book :> Post '[JSON] Book server :: Server MyApi server = postBook where postBook :: Book -> Handler Book postBook book = ...insert into your db... |
Defined in Servant.Server.Internal Methods route :: Proxy (ReqBody' mods list a :> api) -> Context context -> Delayed env (Server (ReqBody' mods list a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (ReqBody' mods list a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (ReqBody' mods list a :> api) m -> ServerT (ReqBody' mods list a :> api) n Source # | |
(FramingUnrender framing, FromSourceIO chunk a, MimeUnrender ctype chunk, HasServer api context) => HasServer (StreamBody' mods framing ctype a :> api :: Type) context Source # | |
Defined in Servant.Server.Internal Methods route :: Proxy (StreamBody' mods framing ctype a :> api) -> Context context -> Delayed env (Server (StreamBody' mods framing ctype a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (StreamBody' mods framing ctype a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (StreamBody' mods framing ctype a :> api) m -> ServerT (StreamBody' mods framing ctype a :> api) n Source # | |
(HasServer api ctx, HasContextEntry ctx (Acquire a)) => HasServer (WithResource a :> api :: Type) ctx Source # | If you use |
Defined in Servant.Server.Internal Methods route :: Proxy (WithResource a :> api) -> Context ctx -> Delayed env (Server (WithResource a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (WithResource a :> api) -> Proxy ctx -> (forall x. m x -> n x) -> ServerT (WithResource a :> api) m -> ServerT (WithResource a :> api) n Source # | |
HasServer api context => HasServer (Vault :> api :: Type) context Source # | |
Defined in Servant.Server.Internal | |
(TypeError (NoInstanceForSub (HasServer :: Type -> [Type] -> Constraint) ty) :: Constraint) => HasServer (ty :> sub :: Type) context Source # | |
type MkLink (arr :> sub :: Type) _1 | |
Defined in Servant.Links | |
type MkLink (sym :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (HttpVersion :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (BasicAuth realm a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (Capture' mods sym v :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (CaptureAll sym v :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Description s :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Summary s :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (AuthProtect tag :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Fragment v :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Header' mods sym a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (IsSecure :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (QueryFlag sym :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (QueryParam' mods sym v :> sub :: Type) a | |
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 | |
Defined in Servant.Links | |
type MkLink (RemoteHost :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (ReqBody' mods ct a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (StreamBody' mods framing ct a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (WithResource res :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Vault :> sub :: Type) a | |
Defined in Servant.Links | |
type ServerT (arr :> sub :: Type) _1 Source # | |
Defined in Servant.Server.Internal | |
type ServerT (path :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (HttpVersion :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (BasicAuth realm usr :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (Capture' mods capture a :> api :: Type) m Source # | |
type ServerT (CaptureAll capture a :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (Description desc :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (Summary desc :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (EmptyAPI :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (AuthProtect tag :> api :: Type) m Source # | |
Defined in Servant.Server.Experimental.Auth | |
type ServerT (Fragment a1 :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (Header' mods sym a :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (IsSecure :> api :: Type) m Source # | |
type ServerT (QueryFlag sym :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (QueryParam' mods sym a :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (QueryParams sym a :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (DeepQuery sym a :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (QueryString :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (RemoteHost :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (ReqBody' mods list a :> api :: Type) m Source # | |
type ServerT (StreamBody' mods framing ctype a :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (WithResource a :> api :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (Vault :> api :: Type) m Source # | |
data BasicAuth (realm :: Symbol) userData #
Instances
HasLink sub => HasLink (BasicAuth realm a :> sub :: Type) | |
(KnownSymbol realm, HasServer api context, HasContextEntry context (BasicAuthCheck usr)) => HasServer (BasicAuth realm usr :> api :: Type) context Source # | Basic Authentication |
Defined in Servant.Server.Internal Methods route :: Proxy (BasicAuth realm usr :> api) -> Context context -> Delayed env (Server (BasicAuth realm usr :> api)) -> Router env Source # hoistServerWithContext :: Proxy (BasicAuth realm usr :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (BasicAuth realm usr :> api) m -> ServerT (BasicAuth realm usr :> api) n Source # | |
type MkLink (BasicAuth realm a :> sub :: Type) r | |
Defined in Servant.Links | |
type ServerT (BasicAuth realm usr :> api :: Type) m Source # | |
Defined in Servant.Server.Internal |
data ResponseHeader (sym :: Symbol) a #
Constructors
Header a | |
MissingHeader | |
UndecodableHeader ByteString |
Instances
Functor (ResponseHeader sym) | |
Defined in Servant.API.ResponseHeaders Methods fmap :: (a -> b) -> ResponseHeader sym a -> ResponseHeader sym b (<$) :: a -> ResponseHeader sym b -> ResponseHeader sym a | |
NFData a => NFData (ResponseHeader sym a) | |
Defined in Servant.API.ResponseHeaders Methods rnf :: ResponseHeader sym a -> () | |
Show a => Show (ResponseHeader sym a) | |
Defined in Servant.API.ResponseHeaders Methods showsPrec :: Int -> ResponseHeader sym a -> ShowS show :: ResponseHeader sym a -> String showList :: [ResponseHeader sym a] -> ShowS | |
Eq a => Eq (ResponseHeader sym a) | |
Defined in Servant.API.ResponseHeaders Methods (==) :: ResponseHeader sym a -> ResponseHeader sym a -> Bool (/=) :: ResponseHeader sym a -> ResponseHeader sym a -> Bool |
Constructors
a :<|> b |
Instances
Bifoldable (:<|>) | |
Bifunctor (:<|>) | |
Bitraversable (:<|>) | |
Defined in Servant.API.Alternative Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (a :<|> b) -> f (c :<|> d) | |
Biapplicative (:<|>) | |
Defined in Servant.API.Alternative | |
(HasLink a, HasLink b) => HasLink (a :<|> b :: Type) | |
(HasServer a context, HasServer b context) => HasServer (a :<|> b :: Type) context Source # | A server for type MyApi = "books" :> Get '[JSON] [Book] -- GET /books :<|> "books" :> ReqBody Book :> Post '[JSON] Book -- POST /books server :: Server MyApi server = listAllBooks :<|> postBook where listAllBooks = ... postBook book = ... |
Functor ((:<|>) a) | |
Foldable ((:<|>) a) | |
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 elem :: Eq a0 => a0 -> (a :<|> a0) -> Bool maximum :: Ord a0 => (a :<|> a0) -> a0 minimum :: Ord a0 => (a :<|> a0) -> a0 | |
Traversable ((:<|>) a) | |
(Monoid a, Monoid b) => Monoid (a :<|> b) | |
(Semigroup a, Semigroup b) => Semigroup (a :<|> b) | |
(Bounded a, Bounded b) => Bounded (a :<|> b) | |
Defined in Servant.API.Alternative | |
(Show a, Show b) => Show (a :<|> b) | |
(Eq a, Eq b) => Eq (a :<|> b) | |
type MkLink (a :<|> b :: Type) r | |
type ServerT (a :<|> b :: Type) m Source # | |
class Accept (ctype :: k) where #
Minimal complete definition
Instances
Accept FormUrlEncoded | |
Defined in Servant.API.ContentTypes Methods contentType :: Proxy FormUrlEncoded -> MediaType # contentTypes :: Proxy FormUrlEncoded -> NonEmpty MediaType # | |
Accept JSON | |
Defined in Servant.API.ContentTypes | |
Accept OctetStream | |
Defined in Servant.API.ContentTypes Methods contentType :: Proxy OctetStream -> MediaType # contentTypes :: Proxy OctetStream -> NonEmpty MediaType # | |
Accept PlainText | |
Defined in Servant.API.ContentTypes Methods contentType :: Proxy PlainText -> MediaType # contentTypes :: Proxy PlainText -> NonEmpty MediaType # |
data Capture' (mods :: [Type]) (sym :: Symbol) a #
Instances
(ToHttpApiData v, HasLink sub) => HasLink (Capture' mods sym v :> sub :: Type) | |
(KnownSymbol capture, FromHttpApiData a, Typeable a, HasServer api context, SBoolI (FoldLenient mods), HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (Capture' mods capture a :> api :: Type) context Source # | If you use You can control how it'll be converted from Example: type MyApi = "books" :> Capture "isbn" Text :> Get '[JSON] Book server :: Server MyApi server = getBook where getBook :: Text -> Handler Book getBook isbn = ... |
Defined in Servant.Server.Internal Methods route :: Proxy (Capture' mods capture a :> api) -> Context context -> Delayed env (Server (Capture' mods capture a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (Capture' mods capture a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (Capture' mods capture a :> api) m -> ServerT (Capture' mods capture a :> api) n Source # | |
type MkLink (Capture' mods sym v :> sub :: Type) a | |
Defined in Servant.Links | |
type ServerT (Capture' mods capture a :> api :: Type) m Source # | |
data CaptureAll (sym :: Symbol) a #
Instances
(ToHttpApiData v, HasLink sub) => HasLink (CaptureAll sym v :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (CaptureAll sym v :> sub) -> Link -> MkLink (CaptureAll sym v :> sub) a # | |
(KnownSymbol capture, FromHttpApiData a, Typeable a, HasServer api context, HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (CaptureAll capture a :> api :: Type) context Source # | If you use You can control how they'll be converted from Example: type MyApi = "src" :> CaptureAll "segments" Text :> Get '[JSON] SourceFile server :: Server MyApi server = getSourceFile where getSourceFile :: [Text] -> Handler Book getSourceFile pathSegments = ... |
Defined in Servant.Server.Internal Methods route :: Proxy (CaptureAll capture a :> api) -> Context context -> Delayed env (Server (CaptureAll capture a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (CaptureAll capture a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (CaptureAll capture a :> api) m -> ServerT (CaptureAll capture a :> api) n Source # | |
type MkLink (CaptureAll sym v :> sub :: Type) a | |
Defined in Servant.Links | |
type ServerT (CaptureAll capture a :> api :: Type) m Source # | |
Defined in Servant.Server.Internal |
data DeepQuery (sym :: Symbol) a #
Instances
(KnownSymbol sym, FromDeepQuery a, HasServer api context, HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (DeepQuery sym a :> api :: Type) context Source # | If you use This lets you extract an object from multiple parameters in the query string,
with its fields enclosed in brackets: `/books?filter[author][name]=value`. When
all the fields are known in advance, it can be done with The way the object is constructed from the extracted fields can be controlled by
providing an instance on Example: type MyApi = "books" :> DeepQuery "filter" BookQuery :> Get '[JSON] [Book] server :: Server MyApi server = getBooksBy where getBooksBy :: BookQuery -> Handler [Book] getBooksBy query = ...filter books based on the dynamic filters provided... |
Defined in Servant.Server.Internal Methods route :: Proxy (DeepQuery sym a :> api) -> Context context -> Delayed env (Server (DeepQuery sym a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (DeepQuery sym a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (DeepQuery sym a :> api) m -> ServerT (DeepQuery sym a :> api) n Source # | |
type ServerT (DeepQuery sym a :> api :: Type) m Source # | |
Defined in Servant.Server.Internal |
data Description (sym :: Symbol) #
Instances
HasLink sub => HasLink (Description s :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (Description s :> sub) -> Link -> MkLink (Description s :> sub) a # | |
HasServer api ctx => HasServer (Description desc :> api :: Type) ctx Source # | Ignore |
Defined in Servant.Server.Internal Methods route :: Proxy (Description desc :> api) -> Context ctx -> Delayed env (Server (Description desc :> api)) -> Router env Source # hoistServerWithContext :: Proxy (Description desc :> api) -> Proxy ctx -> (forall x. m x -> n x) -> ServerT (Description desc :> api) m -> ServerT (Description desc :> api) n Source # | |
type MkLink (Description s :> sub :: Type) a | |
Defined in Servant.Links | |
type ServerT (Description desc :> api :: Type) m Source # | |
Defined in Servant.Server.Internal |
Constructors
EmptyAPI |
Instances
Bounded EmptyAPI | |||||
Defined in Servant.API.Empty | |||||
Enum EmptyAPI | |||||
Defined in Servant.API.Empty | |||||
Show EmptyAPI | |||||
Eq EmptyAPI | |||||
HasLink EmptyAPI | |||||
HasServer EmptyAPI context Source # | The server for an type MyApi = "nothing" :> EmptyApi server :: Server MyApi server = emptyServer | ||||
Defined in Servant.Server.Internal Associated Types
| |||||
HasServer api context => HasServer (EmptyAPI :> api :: Type) context Source # | Ignore | ||||
Defined in Servant.Server.Internal | |||||
type MkLink EmptyAPI a | |||||
Defined in Servant.Links | |||||
type ServerT EmptyAPI m Source # | |||||
Defined in Servant.Server.Internal | |||||
type ServerT (EmptyAPI :> api :: Type) m Source # | |||||
Defined in Servant.Server.Internal |
Instances
(HasLink sub, ToHttpApiData v) => HasLink (Fragment v :> sub :: Type) | |
(AtMostOneFragment api, FragmentUnique (Fragment a1 :> api), HasServer api context) => HasServer (Fragment a1 :> api :: Type) context Source # | Ignore Example: type MyApi = "books" :> Fragment Text :> Get '[JSON] [Book] server :: Server MyApi server = getBooks where getBooks :: Handler [Book] getBooks = ...return all books... |
Defined in Servant.Server.Internal Methods route :: Proxy (Fragment a1 :> api) -> Context context -> Delayed env (Server (Fragment a1 :> api)) -> Router env Source # hoistServerWithContext :: Proxy (Fragment a1 :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (Fragment a1 :> api) m -> ServerT (Fragment a1 :> api) n Source # | |
AtMostOneFragment (Fragment a) | |
Defined in Servant.API.TypeLevel | |
type MkLink (Fragment v :> sub :: Type) a | |
Defined in Servant.Links | |
type ServerT (Fragment a1 :> api :: Type) m Source # | |
Defined in Servant.Server.Internal |
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
FramingRender NetstringFraming | |
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 | |
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 | |
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
FramingUnrender NetstringFraming | |
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 | |
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 | |
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
MonadIO m => FromSourceIO a (SourceT m a) | |
Defined in Servant.API.Stream Methods fromSourceIO :: SourceIO a -> IO (SourceT m a) # |
data Header' (mods :: [Type]) (sym :: Symbol) a #
Instances
(KnownSymbol h, ToHttpApiData v) => AddHeader mods h v (Headers (fst ': rest) a) (Headers (Header' mods h v ': (fst ': rest)) a) | |
Defined in Servant.API.ResponseHeaders Methods addOptionalHeader :: ResponseHeader h v -> Headers (fst ': rest) a -> Headers (Header' mods h v ': (fst ': rest)) a | |
HasResponseHeader h a (Header' mods h a ': rest) | |
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) | |
(KnownSymbol sym, FromHttpApiData a, HasServer api context, SBoolI (FoldRequired mods), SBoolI (FoldLenient mods), HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (Header' mods sym a :> api :: Type) context Source # | If you use All it asks is for a Example: newtype Referer = Referer Text deriving (Eq, Show, FromHttpApiData) -- GET /view-my-referer type MyApi = "view-my-referer" :> Header "Referer" Referer :> Get '[JSON] Referer server :: Server MyApi server = viewReferer where viewReferer :: Referer -> Handler referer viewReferer referer = return referer |
Defined in Servant.Server.Internal Methods route :: Proxy (Header' mods sym a :> api) -> Context context -> Delayed env (Server (Header' mods sym a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (Header' mods sym a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (Header' mods sym a :> api) m -> ServerT (Header' mods sym a :> api) n Source # | |
(FromHttpApiData v, BuildHeadersTo xs, KnownSymbol h) => BuildHeadersTo (Header' mods h v ': xs) | |
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) | |
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) | |
Defined in Servant.API.ResponseHeaders Methods getHeadersFromHList :: HList (Header' mods h x ': xs) -> [Header] | |
type MkLink (Header' mods sym a :> sub :: Type) r | |
Defined in Servant.Links | |
type ServerT (Header' mods sym a :> api :: Type) m Source # | |
Defined in Servant.Server.Internal |
Instances
Generic IsSecure | |||||
Defined in Servant.API.IsSecure Associated Types
| |||||
Read IsSecure | |||||
Defined in Servant.API.IsSecure | |||||
Show IsSecure | |||||
Eq IsSecure | |||||
Ord IsSecure | |||||
Defined in Servant.API.IsSecure | |||||
HasLink sub => HasLink (IsSecure :> sub :: Type) | |||||
HasServer api context => HasServer (IsSecure :> api :: Type) context Source # | |||||
Defined in Servant.Server.Internal | |||||
type Rep IsSecure | |||||
Defined in Servant.API.IsSecure type Rep IsSecure = D1 ('MetaData "IsSecure" "Servant.API.IsSecure" "servant-0.20.2-Dpi2iKtDCNG45viqOW9pMM" 'False) (C1 ('MetaCons "Secure" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotSecure" 'PrefixI 'False) (U1 :: Type -> Type)) | |||||
type MkLink (IsSecure :> sub :: Type) a | |||||
Defined in Servant.Links | |||||
type ServerT (IsSecure :> api :: Type) m Source # | |||||
data NoContentVerb (method :: k1) #
Instances
HasLink (NoContentVerb m :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (NoContentVerb m) -> Link -> MkLink (NoContentVerb m) a # | |||||
ReflectMethod method => HasServer (NoContentVerb method :: Type) context Source # | |||||
Defined in Servant.Server.Internal Methods route :: Proxy (NoContentVerb method) -> Context context -> Delayed env (Server (NoContentVerb method)) -> Router env Source # hoistServerWithContext :: Proxy (NoContentVerb method) -> Proxy context -> (forall x. m x -> n x) -> ServerT (NoContentVerb method) m -> ServerT (NoContentVerb method) n Source # | |||||
Generic (NoContentVerb method) | |||||
Defined in Servant.API.Verbs Associated Types
Methods from :: NoContentVerb method -> Rep (NoContentVerb method) x to :: Rep (NoContentVerb method) x -> NoContentVerb method | |||||
type MkLink (NoContentVerb m :: Type) r | |||||
Defined in Servant.Links | |||||
type ServerT (NoContentVerb method :: Type) m Source # | |||||
Defined in Servant.Server.Internal | |||||
type Rep (NoContentVerb method) | |||||
Defined in Servant.API.Verbs type Rep (NoContentVerb method) = D1 ('MetaData "NoContentVerb" "Servant.API.Verbs" "servant-0.20.2-Dpi2iKtDCNG45viqOW9pMM" 'False) (V1 :: Type -> Type) |
data QueryFlag (sym :: Symbol) #
Instances
(KnownSymbol sym, HasLink sub) => HasLink (QueryFlag sym :> sub :: Type) | |
(KnownSymbol sym, HasServer api context) => HasServer (QueryFlag sym :> api :: Type) context Source # | If you use Example: type MyApi = "books" :> QueryFlag "published" :> Get '[JSON] [Book] server :: Server MyApi server = getBooks where getBooks :: Bool -> Handler [Book] getBooks onlyPublished = ...return all books, or only the ones that are already published, depending on the argument... |
Defined in Servant.Server.Internal Methods route :: Proxy (QueryFlag sym :> api) -> Context context -> Delayed env (Server (QueryFlag sym :> api)) -> Router env Source # hoistServerWithContext :: Proxy (QueryFlag sym :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (QueryFlag sym :> api) m -> ServerT (QueryFlag sym :> api) n Source # | |
type MkLink (QueryFlag sym :> sub :: Type) a | |
Defined in Servant.Links | |
type ServerT (QueryFlag sym :> api :: Type) m Source # | |
Defined in Servant.Server.Internal |
data QueryParam' (mods :: [Type]) (sym :: Symbol) a #
Instances
(KnownSymbol sym, ToHttpApiData v, HasLink sub, SBoolI (FoldRequired mods)) => HasLink (QueryParam' mods sym v :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (QueryParam' mods sym v :> sub) -> Link -> MkLink (QueryParam' mods sym v :> sub) a # | |
(KnownSymbol sym, FromHttpApiData a, HasServer api context, SBoolI (FoldRequired mods), SBoolI (FoldLenient mods), HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (QueryParam' mods sym a :> api :: Type) context Source # | If you use This lets servant worry about looking it up in the query string
and turning it into a value of the type you specify, enclosed
in You can control how it'll be converted from Example: type MyApi = "books" :> QueryParam "author" Text :> Get '[JSON] [Book] server :: Server MyApi server = getBooksBy where getBooksBy :: Maybe Text -> Handler [Book] getBooksBy Nothing = ...return all books... getBooksBy (Just author) = ...return books by the given author... |
Defined in Servant.Server.Internal Methods route :: Proxy (QueryParam' mods sym a :> api) -> Context context -> Delayed env (Server (QueryParam' mods sym a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (QueryParam' mods sym a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (QueryParam' mods sym a :> api) m -> ServerT (QueryParam' mods sym a :> api) n Source # | |
type MkLink (QueryParam' mods sym v :> sub :: Type) a | |
Defined in Servant.Links type MkLink (QueryParam' mods sym v :> sub :: Type) a = If (FoldRequired mods) v (Maybe v) -> MkLink sub a | |
type ServerT (QueryParam' mods sym a :> api :: Type) m Source # | |
Defined in Servant.Server.Internal |
data QueryParams (sym :: Symbol) a #
Instances
(KnownSymbol sym, ToHttpApiData v, HasLink sub) => HasLink (QueryParams sym v :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (QueryParams sym v :> sub) -> Link -> MkLink (QueryParams sym v :> sub) a # | |
(KnownSymbol sym, FromHttpApiData a, HasServer api context, HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (QueryParams sym a :> api :: Type) context Source # | If you use This lets servant worry about looking up 0 or more values in the query string
associated to You can control how the individual values are converted from Example: type MyApi = "books" :> QueryParams "authors" Text :> Get '[JSON] [Book] server :: Server MyApi server = getBooksBy where getBooksBy :: [Text] -> Handler [Book] getBooksBy authors = ...return all books by these authors... |
Defined in Servant.Server.Internal Methods route :: Proxy (QueryParams sym a :> api) -> Context context -> Delayed env (Server (QueryParams sym a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (QueryParams sym a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (QueryParams sym a :> api) m -> ServerT (QueryParams sym a :> api) n Source # | |
type MkLink (QueryParams sym v :> sub :: Type) a | |
Defined in Servant.Links | |
type ServerT (QueryParams sym a :> api :: Type) m Source # | |
Defined in Servant.Server.Internal |
data QueryString #
Instances
HasServer api context => HasServer (QueryString :> api :: Type) context Source # | If you use This lets you extract the whole query string. This is useful when the query string
can contain parameters with dynamic names, that you can't access with Example: type MyApi = "books" :> QueryString :> Get '[JSON] [Book] server :: Server MyApi server = getBooksBy where getBooksBy :: Query -> Handler [Book] getBooksBy filters = ...filter books based on the dynamic filters provided... |
Defined in Servant.Server.Internal Methods route :: Proxy (QueryString :> api) -> Context context -> Delayed env (Server (QueryString :> api)) -> Router env Source # hoistServerWithContext :: Proxy (QueryString :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (QueryString :> api) m -> ServerT (QueryString :> api) n Source # | |
type ServerT (QueryString :> api :: Type) m Source # | |
Defined in Servant.Server.Internal |
Instances
HasLink Raw | |||||
HasServer Raw context Source # | Just pass the request to the underlying application and serve its response. Example: type MyApi = "images" :> Raw server :: Server MyApi server = serveDirectory "/var/www/images" | ||||
Defined in Servant.Server.Internal Associated Types
| |||||
type MkLink Raw a | |||||
Defined in Servant.Links | |||||
type ServerT Raw m Source # | |||||
Defined in Servant.Server.Internal |
Instances
HasLink RawM | |||||
HasServer RawM context Source # | Just pass the request to the underlying application and serve its response. Example: type MyApi = "images" :> Raw server :: Server MyApi server = serveDirectory "/var/www/images" | ||||
Defined in Servant.Server.Internal Associated Types
| |||||
type MkLink RawM a | |||||
Defined in Servant.Links | |||||
type ServerT RawM m Source # | |||||
Defined in Servant.Server.Internal |
class ReflectMethod (a :: k) where #
Methods
reflectMethod :: Proxy a -> Method #
Instances
ReflectMethod 'CONNECT | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'CONNECT -> Method # | |
ReflectMethod 'DELETE | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'DELETE -> Method # | |
ReflectMethod 'GET | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'GET -> Method # | |
ReflectMethod 'HEAD | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'HEAD -> Method # | |
ReflectMethod 'OPTIONS | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'OPTIONS -> Method # | |
ReflectMethod 'PATCH | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'PATCH -> Method # | |
ReflectMethod 'POST | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'POST -> Method # | |
ReflectMethod 'PUT | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'PUT -> Method # | |
ReflectMethod 'TRACE | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'TRACE -> Method # |
data RemoteHost #
Instances
HasLink sub => HasLink (RemoteHost :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (RemoteHost :> sub) -> Link -> MkLink (RemoteHost :> sub) a # | |
HasServer api context => HasServer (RemoteHost :> api :: Type) context Source # | |
Defined in Servant.Server.Internal Methods route :: Proxy (RemoteHost :> api) -> Context context -> Delayed env (Server (RemoteHost :> api)) -> Router env Source # hoistServerWithContext :: Proxy (RemoteHost :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (RemoteHost :> api) m -> ServerT (RemoteHost :> api) n Source # | |
type MkLink (RemoteHost :> sub :: Type) a | |
Defined in Servant.Links | |
type ServerT (RemoteHost :> api :: Type) m Source # | |
Defined in Servant.Server.Internal |
data ReqBody' (mods :: [Type]) (contentTypes :: [Type]) a #
Instances
HasLink sub => HasLink (ReqBody' mods ct a :> sub :: Type) | |
(AllCTUnrender list a, HasServer api context, SBoolI (FoldLenient mods), HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (ReqBody' mods list a :> api :: Type) context Source # | If you use All it asks is for a Example: type MyApi = "books" :> ReqBody '[JSON] Book :> Post '[JSON] Book server :: Server MyApi server = postBook where postBook :: Book -> Handler Book postBook book = ...insert into your db... |
Defined in Servant.Server.Internal Methods route :: Proxy (ReqBody' mods list a :> api) -> Context context -> Delayed env (Server (ReqBody' mods list a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (ReqBody' mods list a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (ReqBody' mods list a :> api) m -> ServerT (ReqBody' mods list a :> api) n Source # | |
type MkLink (ReqBody' mods ct a :> sub :: Type) r | |
Defined in Servant.Links | |
type ServerT (ReqBody' mods list a :> api :: Type) m Source # | |
data SBool (b :: Bool) where #
Instances
EqP SBool | |
Defined in Data.Singletons.Bool | |
GNFData SBool | |
Defined in Data.Singletons.Bool | |
GCompare SBool | |
Defined in Data.Singletons.Bool | |
GEq SBool | |
Defined in Data.Singletons.Bool | |
GRead SBool | |
Defined in Data.Singletons.Bool Methods greadsPrec :: Int -> GReadS SBool | |
GShow SBool | |
Defined in Data.Singletons.Bool Methods gshowsPrec :: forall (a :: Bool). Int -> SBool a -> ShowS | |
OrdP SBool | |
Defined in Data.Singletons.Bool | |
SBoolI b => Boring (SBool b) | |
Defined in Data.Singletons.Bool | |
NFData (SBool b) | |
Defined in Data.Singletons.Bool | |
Show (SBool b) | |
Eq (SBool b) | |
Ord (SBool b) | |
class SBoolI (b :: Bool) where #
Instances
SBoolI 'False | |
Defined in Data.Singletons.Bool | |
SBoolI 'True | |
Defined in Data.Singletons.Bool |
data Stream (method :: k1) (status :: Nat) framing contentType a #
Instances
HasLink (Stream m status fr ct a :: Type) | |||||
(MimeRender ctype chunk, ReflectMethod method, KnownNat status, FramingRender framing, ToSourceIO chunk a, GetHeaders (Headers h a)) => HasServer (Stream method status framing ctype (Headers h a) :: Type) context Source # | |||||
Defined in Servant.Server.Internal Methods route :: Proxy (Stream method status framing ctype (Headers h a)) -> Context context -> Delayed env (Server (Stream method status framing ctype (Headers h a))) -> Router env Source # hoistServerWithContext :: Proxy (Stream method status framing ctype (Headers h a)) -> Proxy context -> (forall x. m x -> n x) -> ServerT (Stream method status framing ctype (Headers h a)) m -> ServerT (Stream method status framing ctype (Headers h a)) n Source # | |||||
(MimeRender ctype chunk, ReflectMethod method, KnownNat status, FramingRender framing, ToSourceIO chunk a) => HasServer (Stream method status framing ctype a :: Type) context Source # | |||||
Defined in Servant.Server.Internal Methods route :: Proxy (Stream method status framing ctype a) -> Context context -> Delayed env (Server (Stream method status framing ctype a)) -> Router env Source # hoistServerWithContext :: Proxy (Stream method status framing ctype a) -> Proxy context -> (forall x. m x -> n x) -> ServerT (Stream method status framing ctype a) m -> ServerT (Stream method status framing ctype a) n Source # | |||||
Generic (Stream method status framing contentType a) | |||||
Defined in Servant.API.Stream Associated Types
| |||||
type MkLink (Stream m status fr ct a :: Type) r | |||||
Defined in Servant.Links | |||||
type ServerT (Stream method status framing ctype (Headers h a) :: Type) m Source # | |||||
Defined in Servant.Server.Internal | |||||
type ServerT (Stream method status framing ctype a :: Type) m Source # | |||||
Defined in Servant.Server.Internal | |||||
type Rep (Stream method status framing contentType a) | |||||
Defined in Servant.API.Stream type Rep (Stream method status framing contentType a) = D1 ('MetaData "Stream" "Servant.API.Stream" "servant-0.20.2-Dpi2iKtDCNG45viqOW9pMM" 'False) (V1 :: Type -> Type) |
data StreamBody' (mods :: [Type]) framing contentType a #
Instances
HasLink sub => HasLink (StreamBody' mods framing ct a :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a0) -> Proxy (StreamBody' mods framing ct a :> sub) -> Link -> MkLink (StreamBody' mods framing ct a :> sub) a0 # | |||||
(FramingUnrender framing, FromSourceIO chunk a, MimeUnrender ctype chunk, HasServer api context) => HasServer (StreamBody' mods framing ctype a :> api :: Type) context Source # | |||||
Defined in Servant.Server.Internal Methods route :: Proxy (StreamBody' mods framing ctype a :> api) -> Context context -> Delayed env (Server (StreamBody' mods framing ctype a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (StreamBody' mods framing ctype a :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (StreamBody' mods framing ctype a :> api) m -> ServerT (StreamBody' mods framing ctype a :> api) n Source # | |||||
Generic (StreamBody' mods framing contentType a) | |||||
Defined in Servant.API.Stream Associated Types
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 MkLink (StreamBody' mods framing ct a :> sub :: Type) r | |||||
Defined in Servant.Links | |||||
type ServerT (StreamBody' mods framing ctype a :> api :: Type) m Source # | |||||
Defined in Servant.Server.Internal | |||||
type Rep (StreamBody' mods framing contentType a) | |||||
Defined in Servant.API.Stream type Rep (StreamBody' mods framing contentType a) = D1 ('MetaData "StreamBody'" "Servant.API.Stream" "servant-0.20.2-Dpi2iKtDCNG45viqOW9pMM" 'False) (V1 :: Type -> Type) |
data Summary (sym :: Symbol) #
Instances
HasLink sub => HasLink (Summary s :> sub :: Type) | |
HasServer api ctx => HasServer (Summary desc :> api :: Type) ctx Source # | Ignore |
Defined in Servant.Server.Internal | |
type MkLink (Summary s :> sub :: Type) a | |
Defined in Servant.Links | |
type ServerT (Summary desc :> api :: Type) m Source # | |
Defined in Servant.Server.Internal |
class ToSourceIO chunk a | a -> chunk where #
Methods
toSourceIO :: a -> SourceIO chunk #
Instances
ToSourceIO a (NonEmpty a) | |
Defined in Servant.API.Stream Methods toSourceIO :: NonEmpty a -> SourceIO a # | |
ToSourceIO a [a] | |
Defined in Servant.API.Stream Methods toSourceIO :: [a] -> SourceIO a # | |
SourceToSourceIO m => ToSourceIO chunk (SourceT m chunk) | |
Defined in Servant.API.Stream Methods toSourceIO :: SourceT m chunk -> SourceIO chunk # |
data Verb (method :: k1) (statusCode :: Nat) (contentTypes :: [Type]) a #
Instances
HasLink (Verb m s ct a :: Type) | |||||
(AllCTRender ctypes a, ReflectMethod method, KnownNat status, GetHeaders (Headers h a)) => HasServer (Verb method status ctypes (Headers h a) :: Type) context Source # | |||||
Defined in Servant.Server.Internal Methods route :: Proxy (Verb method status ctypes (Headers h a)) -> Context context -> Delayed env (Server (Verb method status ctypes (Headers h a))) -> Router env Source # hoistServerWithContext :: Proxy (Verb method status ctypes (Headers h a)) -> Proxy context -> (forall x. m x -> n x) -> ServerT (Verb method status ctypes (Headers h a)) m -> ServerT (Verb method status ctypes (Headers h a)) n Source # | |||||
(AllCTRender ctypes a, ReflectMethod method, KnownNat status) => HasServer (Verb method status ctypes a :: Type) context Source # | |||||
Defined in Servant.Server.Internal Methods route :: Proxy (Verb method status ctypes a) -> Context context -> Delayed env (Server (Verb method status ctypes a)) -> Router env Source # hoistServerWithContext :: Proxy (Verb method status ctypes a) -> Proxy context -> (forall x. m x -> n x) -> ServerT (Verb method status ctypes a) m -> ServerT (Verb method status ctypes a) n Source # | |||||
Generic (Verb method statusCode contentTypes a) | |||||
Defined in Servant.API.Verbs Associated Types
| |||||
AtMostOneFragment (Verb m s ct typ) | |||||
Defined in Servant.API.TypeLevel | |||||
type MkLink (Verb m s ct a :: Type) r | |||||
Defined in Servant.Links | |||||
type ServerT (Verb method status ctypes (Headers h a) :: Type) m Source # | |||||
Defined in Servant.Server.Internal | |||||
type ServerT (Verb method status ctypes a :: Type) m Source # | |||||
Defined in Servant.Server.Internal | |||||
type Rep (Verb method statusCode contentTypes a) | |||||
Defined in Servant.API.Verbs type Rep (Verb method statusCode contentTypes a) = D1 ('MetaData "Verb" "Servant.API.Verbs" "servant-0.20.2-Dpi2iKtDCNG45viqOW9pMM" 'False) (V1 :: Type -> Type) |
data WithNamedContext (name :: Symbol) (subContext :: [Type]) (subApi :: k) #
Instances
HasLink sub => HasLink (WithNamedContext name context sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (WithNamedContext name context sub) -> Link -> MkLink (WithNamedContext name context sub) a # | |
(HasContextEntry context (NamedContext name subContext), HasServer subApi subContext) => HasServer (WithNamedContext name subContext subApi :: Type) context Source # | |
Defined in Servant.Server.Internal Methods route :: Proxy (WithNamedContext name subContext subApi) -> Context context -> Delayed env (Server (WithNamedContext name subContext subApi)) -> Router env Source # hoistServerWithContext :: Proxy (WithNamedContext name subContext subApi) -> Proxy context -> (forall x. m x -> n x) -> ServerT (WithNamedContext name subContext subApi) m -> ServerT (WithNamedContext name subContext subApi) n Source # | |
type MkLink (WithNamedContext name context sub :: Type) a | |
Defined in Servant.Links | |
type ServerT (WithNamedContext name subContext subApi :: Type) m Source # | |
Defined in Servant.Server.Internal |
data WithResource (res :: k) #
Instances
HasLink sub => HasLink (WithResource res :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (WithResource res :> sub) -> Link -> MkLink (WithResource res :> sub) a # | |
(HasServer api ctx, HasContextEntry ctx (Acquire a)) => HasServer (WithResource a :> api :: Type) ctx Source # | If you use |
Defined in Servant.Server.Internal Methods route :: Proxy (WithResource a :> api) -> Context ctx -> Delayed env (Server (WithResource a :> api)) -> Router env Source # hoistServerWithContext :: Proxy (WithResource a :> api) -> Proxy ctx -> (forall x. m x -> n x) -> ServerT (WithResource a :> api) m -> ServerT (WithResource a :> api) n Source # | |
type MkLink (WithResource res :> sub :: Type) a | |
Defined in Servant.Links | |
type ServerT (WithResource a :> api :: Type) m Source # | |
Defined in Servant.Server.Internal |
data NamedRoutes (api :: Type -> Type) #
Instances
(HasLink (ToServantApi routes), forall a. GLink routes a, ErrorIfNoGeneric routes) => HasLink (NamedRoutes routes :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (NamedRoutes routes) -> Link -> MkLink (NamedRoutes routes) a # | |
(HasServer (ToServantApi api) context, forall (m :: Type -> Type). Generic (api (AsServerT m)), forall (m :: Type -> Type). GServer api m, ErrorIfNoGeneric api) => HasServer (NamedRoutes api :: Type) context Source # | |
Defined in Servant.Server.Internal Methods route :: Proxy (NamedRoutes api) -> Context context -> Delayed env (Server (NamedRoutes api)) -> Router env Source # hoistServerWithContext :: Proxy (NamedRoutes api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (NamedRoutes api) m -> ServerT (NamedRoutes api) n Source # | |
type MkLink (NamedRoutes routes :: Type) a | |
Defined in Servant.Links | |
type ServerT (NamedRoutes api :: Type) m Source # | |
Defined in Servant.Server.Internal |
class GenericMode (mode :: k) #
Instances
GenericMode AsApi | |||||
Defined in Servant.API.Generic Associated Types
| |||||
GenericMode (AsLink a :: Type) | |||||
Defined in Servant.Links | |||||
GenericMode (AsServerT m :: Type) Source # | |||||
Defined in Servant.Server.Internal |
type ToServantApi (routes :: Type -> Type) = ToServant routes AsApi #
class GServantProduct (f :: k -> Type) #
Minimal complete definition
gtoServant, gfromServant
Instances
(GServantProduct l, GServantProduct r) => GServantProduct (l :*: r :: k -> Type) | |||||
Defined in Servant.API.Generic Associated Types
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) | |||||
Defined in Servant.API.Generic Associated Types
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) | |||||
Defined in Servant.API.Generic Associated Types
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 |
toServant :: forall {k} routes (mode :: k). GenericServant routes mode => routes mode -> ToServant routes mode #
fromServant :: forall {k} routes (mode :: k). GenericServant routes mode => ToServant routes mode -> routes mode #
class Accept ctype => MimeRender (ctype :: k) a where #
Methods
mimeRender :: Proxy ctype -> a -> ByteString #
Instances
class Accept ctype => MimeUnrender (ctype :: k) a where #
Minimal complete definition
Methods
mimeUnrender :: Proxy ctype -> ByteString -> Either String a #
mimeUnrenderWithType :: Proxy ctype -> MediaType -> ByteString -> Either String a #
Instances
FromForm a => MimeUnrender FormUrlEncoded a | |
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 | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy JSON -> ByteString -> Either String a # mimeUnrenderWithType :: Proxy JSON -> MediaType -> ByteString -> Either String a # | |
MimeUnrender OctetStream ByteString | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy OctetStream -> ByteString -> Either String ByteString # mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String ByteString # | |
MimeUnrender OctetStream ByteString | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy OctetStream -> ByteString -> Either String ByteString # mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String ByteString # | |
MimeUnrender PlainText Text | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy PlainText -> ByteString -> Either String Text # mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String Text # | |
MimeUnrender PlainText Text | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy PlainText -> ByteString -> Either String Text # mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String Text # | |
MimeUnrender PlainText String | |
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) | |
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) | |
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) | |
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) | |
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) # |
Constructors
NoContent |
Instances
NFData NoContent | |||||
Defined in Servant.API.ContentTypes | |||||
Generic NoContent | |||||
Defined in Servant.API.ContentTypes Associated Types
| |||||
Read NoContent | |||||
Defined in Servant.API.ContentTypes | |||||
Show NoContent | |||||
Eq NoContent | |||||
HasStatus NoContent | |||||
Defined in Servant.API.UVerb Associated Types
| |||||
AllMime (ctyp ': (ctyp' ': ctyps)) => AllMimeRender (ctyp ': (ctyp' ': ctyps)) NoContent | |||||
Defined in Servant.API.ContentTypes Methods allMimeRender :: Proxy (ctyp ': (ctyp' ': ctyps)) -> NoContent -> [(MediaType, ByteString)] | |||||
Accept ctyp => AllMimeRender '[ctyp] NoContent | |||||
Defined in Servant.API.ContentTypes Methods allMimeRender :: Proxy '[ctyp] -> NoContent -> [(MediaType, ByteString)] | |||||
type Rep NoContent | |||||
Defined in Servant.API.ContentTypes type Rep NoContent = D1 ('MetaData "NoContent" "Servant.API.ContentTypes" "servant-0.20.2-Dpi2iKtDCNG45viqOW9pMM" 'False) (C1 ('MetaCons "NoContent" 'PrefixI 'False) (U1 :: Type -> Type)) | |||||
type StatusOf NoContent | |||||
Defined in Servant.API.UVerb |
class GetHeaders ls where #
Methods
getHeaders :: ls -> [Header] #
Instances
GetHeadersFromHList hs => GetHeaders (HList hs) | |
Defined in Servant.API.ResponseHeaders Methods getHeaders :: HList hs -> [Header] # | |
GetHeaders' hs => GetHeaders (Headers hs a) | |
Defined in Servant.API.ResponseHeaders Methods getHeaders :: Headers hs a -> [Header] # |
data Headers (ls :: [Type]) a #
Constructors
Headers | |
Fields
|
Instances
(KnownSymbol h, ToHttpApiData v) => AddHeader mods h v (Headers (fst ': rest) a) (Headers (Header' mods h v ': (fst ': rest)) a) | |
Defined in Servant.API.ResponseHeaders Methods addOptionalHeader :: ResponseHeader h v -> Headers (fst ': rest) a -> Headers (Header' mods h v ': (fst ': rest)) a | |
(IsServerResource cts a, GetHeaders (Headers h a)) => IsServerResource cts (Headers h a) Source # | |
Defined in Servant.Server.UVerb Methods resourceResponse :: Request -> Proxy cts -> Headers h a -> Maybe (ByteString, ByteString) resourceHeaders :: Proxy cts -> Headers h a -> [(HeaderName, ByteString)] | |
(AllCTRender ctypes a, ReflectMethod method, KnownNat status, GetHeaders (Headers h a)) => HasServer (Verb method status ctypes (Headers h a) :: Type) context Source # | |
Defined in Servant.Server.Internal Methods route :: Proxy (Verb method status ctypes (Headers h a)) -> Context context -> Delayed env (Server (Verb method status ctypes (Headers h a))) -> Router env Source # hoistServerWithContext :: Proxy (Verb method status ctypes (Headers h a)) -> Proxy context -> (forall x. m x -> n x) -> ServerT (Verb method status ctypes (Headers h a)) m -> ServerT (Verb method status ctypes (Headers h a)) n Source # | |
(MimeRender ctype chunk, ReflectMethod method, KnownNat status, FramingRender framing, ToSourceIO chunk a, GetHeaders (Headers h a)) => HasServer (Stream method status framing ctype (Headers h a) :: Type) context Source # | |
Defined in Servant.Server.Internal Methods route :: Proxy (Stream method status framing ctype (Headers h a)) -> Context context -> Delayed env (Server (Stream method status framing ctype (Headers h a))) -> Router env Source # hoistServerWithContext :: Proxy (Stream method status framing ctype (Headers h a)) -> Proxy context -> (forall x. m x -> n x) -> ServerT (Stream method status framing ctype (Headers h a)) m -> ServerT (Stream method status framing ctype (Headers h a)) n Source # | |
Functor (Headers ls) | |
(NFDataHList ls, NFData a) => NFData (Headers ls a) | |
Defined in Servant.API.ResponseHeaders | |
GetHeaders' hs => GetHeaders (Headers hs a) | |
Defined in Servant.API.ResponseHeaders Methods getHeaders :: Headers hs a -> [Header] # | |
HasStatus a => HasStatus (Headers ls a) | |
Defined in Servant.API.UVerb | |
type ServerT (Verb method status ctypes (Headers h a) :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type ServerT (Stream method status framing ctype (Headers h a) :: Type) m Source # | |
Defined in Servant.Server.Internal | |
type StatusOf (Headers ls a) | |
Defined in Servant.API.UVerb |
class FromHttpApiData a where #
Minimal complete definition
Methods
parseUrlPiece :: Text -> Either Text a #
parseHeader :: ByteString -> Either Text a #
parseQueryParam :: Text -> Either Text a #
Instances
FromHttpApiData SetCookie | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text SetCookie # parseHeader :: ByteString -> Either Text SetCookie # parseQueryParam :: Text -> Either Text SetCookie # | |
FromHttpApiData Void | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Void # parseHeader :: ByteString -> Either Text Void # parseQueryParam :: Text -> Either Text Void # | |
FromHttpApiData All | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text All # parseHeader :: ByteString -> Either Text All # parseQueryParam :: Text -> Either Text All # | |
FromHttpApiData Any | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Any # parseHeader :: ByteString -> Either Text Any # parseQueryParam :: Text -> Either Text Any # | |
FromHttpApiData Version | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Version # parseHeader :: ByteString -> Either Text Version # parseQueryParam :: Text -> Either Text Version # | |
FromHttpApiData Int16 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Int16 # parseHeader :: ByteString -> Either Text Int16 # parseQueryParam :: Text -> Either Text Int16 # | |
FromHttpApiData Int32 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Int32 # parseHeader :: ByteString -> Either Text Int32 # parseQueryParam :: Text -> Either Text Int32 # | |
FromHttpApiData Int64 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Int64 # parseHeader :: ByteString -> Either Text Int64 # parseQueryParam :: Text -> Either Text Int64 # | |
FromHttpApiData Int8 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Int8 # parseHeader :: ByteString -> Either Text Int8 # parseQueryParam :: Text -> Either Text Int8 # | |
FromHttpApiData Word16 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Word16 # parseHeader :: ByteString -> Either Text Word16 # parseQueryParam :: Text -> Either Text Word16 # | |
FromHttpApiData Word32 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Word32 # parseHeader :: ByteString -> Either Text Word32 # parseQueryParam :: Text -> Either Text Word32 # | |
FromHttpApiData Word64 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Word64 # parseHeader :: ByteString -> Either Text Word64 # parseQueryParam :: Text -> Either Text Word64 # | |
FromHttpApiData Word8 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Word8 # parseHeader :: ByteString -> Either Text Word8 # parseQueryParam :: Text -> Either Text Word8 # | |
FromHttpApiData Ordering | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Ordering # parseHeader :: ByteString -> Either Text Ordering # parseQueryParam :: Text -> Either Text Ordering # | |
FromHttpApiData Text | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Text # parseHeader :: ByteString -> Either Text Text # parseQueryParam :: Text -> Either Text Text # | |
FromHttpApiData Text | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Text # parseHeader :: ByteString -> Either Text Text # parseQueryParam :: Text -> Either Text Text # | |
FromHttpApiData Day | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Day # parseHeader :: ByteString -> Either Text Day # parseQueryParam :: Text -> Either Text Day # | |
FromHttpApiData Month | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Month # parseHeader :: ByteString -> Either Text Month # parseQueryParam :: Text -> Either Text Month # | |
FromHttpApiData Quarter | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Quarter # parseHeader :: ByteString -> Either Text Quarter # parseQueryParam :: Text -> Either Text Quarter # | |
FromHttpApiData QuarterOfYear | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text QuarterOfYear # parseHeader :: ByteString -> Either Text QuarterOfYear # parseQueryParam :: Text -> Either Text QuarterOfYear # | |
FromHttpApiData DayOfWeek | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text DayOfWeek # parseHeader :: ByteString -> Either Text DayOfWeek # parseQueryParam :: Text -> Either Text DayOfWeek # | |
FromHttpApiData NominalDiffTime | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text NominalDiffTime # parseHeader :: ByteString -> Either Text NominalDiffTime # parseQueryParam :: Text -> Either Text NominalDiffTime # | |
FromHttpApiData UTCTime | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text UTCTime # parseHeader :: ByteString -> Either Text UTCTime # parseQueryParam :: Text -> Either Text UTCTime # | |
FromHttpApiData LocalTime | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text LocalTime # parseHeader :: ByteString -> Either Text LocalTime # parseQueryParam :: Text -> Either Text LocalTime # | |
FromHttpApiData TimeOfDay | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text TimeOfDay # parseHeader :: ByteString -> Either Text TimeOfDay # parseQueryParam :: Text -> Either Text TimeOfDay # | |
FromHttpApiData ZonedTime | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text ZonedTime # parseHeader :: ByteString -> Either Text ZonedTime # parseQueryParam :: Text -> Either Text ZonedTime # | |
FromHttpApiData UUID | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text UUID # parseHeader :: ByteString -> Either Text UUID # parseQueryParam :: Text -> Either Text UUID # | |
FromHttpApiData Integer | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Integer # parseHeader :: ByteString -> Either Text Integer # parseQueryParam :: Text -> Either Text Integer # | |
FromHttpApiData Natural | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Natural # parseHeader :: ByteString -> Either Text Natural # parseQueryParam :: Text -> Either Text Natural # | |
FromHttpApiData String | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text String # parseHeader :: ByteString -> Either Text String # parseQueryParam :: Text -> Either Text String # | |
FromHttpApiData () | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text () # parseHeader :: ByteString -> Either Text () # parseQueryParam :: Text -> Either Text () # | |
FromHttpApiData Bool | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Bool # parseHeader :: ByteString -> Either Text Bool # parseQueryParam :: Text -> Either Text Bool # | |
FromHttpApiData Char | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Char # parseHeader :: ByteString -> Either Text Char # parseQueryParam :: Text -> Either Text Char # | |
FromHttpApiData Double | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Double # parseHeader :: ByteString -> Either Text Double # parseQueryParam :: Text -> Either Text Double # | |
FromHttpApiData Float | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Float # parseHeader :: ByteString -> Either Text Float # parseQueryParam :: Text -> Either Text Float # | |
FromHttpApiData Int | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Int # parseHeader :: ByteString -> Either Text Int # parseQueryParam :: Text -> Either Text Int # | |
FromHttpApiData Word | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Word # parseHeader :: ByteString -> Either Text Word # parseQueryParam :: Text -> Either Text Word # | |
FromHttpApiData a => FromHttpApiData (First a) | |
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) | |
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) | |
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) | |
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 (Identity a) | |
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) | |
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) | |
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 (Dual a) | |
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) | |
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) | |
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) | |
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) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (Maybe a) # parseHeader :: ByteString -> Either Text (Maybe a) # parseQueryParam :: Text -> Either Text (Maybe a) # | |
HasResolution a => FromHttpApiData (Fixed a) | |
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 b) => FromHttpApiData (Either a b) | |
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) # | |
FromHttpApiData a => FromHttpApiData (Const a b) | |
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) | |
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) # |
data BasicAuthData #
Constructors
BasicAuthData | |
Fields
|
class KnownStatus (StatusOf a) => HasStatus a #
Instances
HasStatus NoContent | |||||
Defined in Servant.API.UVerb Associated Types
| |||||
HasStatus a => HasStatus (Headers ls a) | |||||
Defined in Servant.API.UVerb | |||||
KnownStatus n => HasStatus (WithStatus n a) | |||||
Defined in Servant.API.UVerb Associated Types
|
type family Statuses (as :: [Type]) :: [Nat] #
Instances
type Statuses ('[] :: [Type]) | |
Defined in Servant.API.UVerb type Statuses ('[] :: [Type]) = '[] :: [Nat] | |
type Statuses (a ': as) | |
Defined in Servant.API.UVerb |
type family Statuses (as :: [Type]) :: [Nat] #
Instances
type Statuses ('[] :: [Type]) | |
Defined in Servant.API.UVerb type Statuses ('[] :: [Type]) = '[] :: [Nat] | |
type Statuses (a ': as) | |
Defined in Servant.API.UVerb |
newtype WithStatus (k :: Nat) a #
Constructors
WithStatus a |
Instances
Instances
Data StdMethod | |||||
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 | |||||
Defined in Network.HTTP.Types.Method | |||||
Enum StdMethod | |||||
Defined in Network.HTTP.Types.Method | |||||
Generic StdMethod | |||||
Defined in Network.HTTP.Types.Method Associated Types
| |||||
Ix StdMethod | |||||
Defined in Network.HTTP.Types.Method Methods range :: (StdMethod, StdMethod) -> [StdMethod] index :: (StdMethod, StdMethod) -> StdMethod -> Int unsafeIndex :: (StdMethod, StdMethod) -> StdMethod -> Int inRange :: (StdMethod, StdMethod) -> StdMethod -> Bool rangeSize :: (StdMethod, StdMethod) -> Int unsafeRangeSize :: (StdMethod, StdMethod) -> Int | |||||
Read StdMethod | |||||
Defined in Network.HTTP.Types.Method | |||||
Show StdMethod | |||||
Eq StdMethod | |||||
Ord StdMethod | |||||
Defined in Network.HTTP.Types.Method | |||||
ReflectMethod 'CONNECT | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'CONNECT -> Method # | |||||
ReflectMethod 'DELETE | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'DELETE -> Method # | |||||
ReflectMethod 'GET | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'GET -> Method # | |||||
ReflectMethod 'HEAD | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'HEAD -> Method # | |||||
ReflectMethod 'OPTIONS | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'OPTIONS -> Method # | |||||
ReflectMethod 'PATCH | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'PATCH -> Method # | |||||
ReflectMethod 'POST | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'POST -> Method # | |||||
ReflectMethod 'PUT | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'PUT -> Method # | |||||
ReflectMethod 'TRACE | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'TRACE -> Method # | |||||
type Rep StdMethod | |||||
Defined in Network.HTTP.Types.Method type Rep StdMethod = D1 ('MetaData "StdMethod" "Network.HTTP.Types.Method" "http-types-0.12.4-GJHVJ4o7poWCoEEi7gy1ZH" '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 HttpVersion #
Constructors
HttpVersion | |
Instances
Data HttpVersion | |||||
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 | |||||
Defined in Network.HTTP.Types.Version Associated Types
| |||||
Show HttpVersion | |||||
Defined in Network.HTTP.Types.Version Methods showsPrec :: Int -> HttpVersion -> ShowS show :: HttpVersion -> String showList :: [HttpVersion] -> ShowS | |||||
Eq HttpVersion | |||||
Defined in Network.HTTP.Types.Version | |||||
Ord HttpVersion | |||||
Defined in Network.HTTP.Types.Version Methods compare :: HttpVersion -> HttpVersion -> Ordering (<) :: HttpVersion -> HttpVersion -> Bool (<=) :: HttpVersion -> HttpVersion -> Bool (>) :: HttpVersion -> HttpVersion -> Bool (>=) :: HttpVersion -> HttpVersion -> Bool max :: HttpVersion -> HttpVersion -> HttpVersion min :: HttpVersion -> HttpVersion -> HttpVersion | |||||
HasLink sub => HasLink (HttpVersion :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (HttpVersion :> sub) -> Link -> MkLink (HttpVersion :> sub) a # | |||||
HasServer api context => HasServer (HttpVersion :> api :: Type) context Source # | |||||
Defined in Servant.Server.Internal Methods route :: Proxy (HttpVersion :> api) -> Context context -> Delayed env (Server (HttpVersion :> api)) -> Router env Source # hoistServerWithContext :: Proxy (HttpVersion :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (HttpVersion :> api) m -> ServerT (HttpVersion :> api) n Source # | |||||
type Rep HttpVersion | |||||
Defined in Network.HTTP.Types.Version type Rep HttpVersion = D1 ('MetaData "HttpVersion" "Network.HTTP.Types.Version" "http-types-0.12.4-GJHVJ4o7poWCoEEi7gy1ZH" '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 MkLink (HttpVersion :> sub :: Type) a | |||||
Defined in Servant.Links | |||||
type ServerT (HttpVersion :> api :: Type) m Source # | |||||
Defined in Servant.Server.Internal |
data FormUrlEncoded #
Instances
Accept FormUrlEncoded | |
Defined in Servant.API.ContentTypes Methods contentType :: Proxy FormUrlEncoded -> MediaType # contentTypes :: Proxy FormUrlEncoded -> NonEmpty MediaType # | |
ToForm a => MimeRender FormUrlEncoded a | |
Defined in Servant.API.ContentTypes Methods mimeRender :: Proxy FormUrlEncoded -> a -> ByteString # | |
FromForm a => MimeUnrender FormUrlEncoded a | |
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) | |
Defined in Servant.API.UVerb Methods mimeRender :: Proxy FormUrlEncoded -> WithStatus _status a -> ByteString # | |
MimeUnrender FormUrlEncoded a => MimeUnrender FormUrlEncoded (WithStatus _status a) | |
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) # |
Instances
Accept JSON | |
Defined in Servant.API.ContentTypes | |
ToJSON a => MimeRender JSON a | |
Defined in Servant.API.ContentTypes Methods mimeRender :: Proxy JSON -> a -> ByteString # | |
FromJSON a => MimeUnrender JSON a | |
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) | |
Defined in Servant.API.UVerb Methods mimeRender :: Proxy JSON -> WithStatus _status a -> ByteString # | |
MimeUnrender JSON a => MimeUnrender JSON (WithStatus _status a) | |
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) # |
data OctetStream #
Instances
Accept OctetStream | |
Defined in Servant.API.ContentTypes Methods contentType :: Proxy OctetStream -> MediaType # contentTypes :: Proxy OctetStream -> NonEmpty MediaType # | |
MimeRender OctetStream ByteString | |
Defined in Servant.API.ContentTypes Methods mimeRender :: Proxy OctetStream -> ByteString -> ByteString # | |
MimeRender OctetStream ByteString | |
Defined in Servant.API.ContentTypes Methods mimeRender :: Proxy OctetStream -> ByteString -> ByteString # | |
MimeUnrender OctetStream ByteString | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy OctetStream -> ByteString -> Either String ByteString # mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String ByteString # | |
MimeUnrender OctetStream ByteString | |
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) | |
Defined in Servant.API.UVerb Methods mimeRender :: Proxy OctetStream -> WithStatus _status a -> ByteString # | |
MimeUnrender OctetStream a => MimeUnrender OctetStream (WithStatus _status a) | |
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) # |
Instances
Accept PlainText | |
Defined in Servant.API.ContentTypes Methods contentType :: Proxy PlainText -> MediaType # contentTypes :: Proxy PlainText -> NonEmpty MediaType # | |
MimeRender PlainText Text | |
Defined in Servant.API.ContentTypes Methods mimeRender :: Proxy PlainText -> Text -> ByteString # | |
MimeRender PlainText Text | |
Defined in Servant.API.ContentTypes Methods mimeRender :: Proxy PlainText -> Text -> ByteString # | |
MimeRender PlainText String | |
Defined in Servant.API.ContentTypes Methods mimeRender :: Proxy PlainText -> String -> ByteString # | |
MimeUnrender PlainText Text | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy PlainText -> ByteString -> Either String Text # mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String Text # | |
MimeUnrender PlainText Text | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy PlainText -> ByteString -> Either String Text # mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String Text # | |
MimeUnrender PlainText String | |
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) | |
Defined in Servant.API.UVerb Methods mimeRender :: Proxy PlainText -> WithStatus _status a -> ByteString # | |
MimeUnrender PlainText a => MimeUnrender PlainText (WithStatus _status a) | |
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
HasLink sub => HasLink (AuthProtect tag :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (AuthProtect tag :> sub) -> Link -> MkLink (AuthProtect tag :> sub) a # | |
(HasServer api context, HasContextEntry context (AuthHandler Request (AuthServerData (AuthProtect tag)))) => HasServer (AuthProtect tag :> api :: Type) context Source # | Known orphan instance. |
Defined in Servant.Server.Experimental.Auth Methods route :: Proxy (AuthProtect tag :> api) -> Context context -> Delayed env (Server (AuthProtect tag :> api)) -> Router env Source # hoistServerWithContext :: Proxy (AuthProtect tag :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (AuthProtect tag :> api) m -> ServerT (AuthProtect tag :> api) n Source # | |
type MkLink (AuthProtect tag :> sub :: Type) a | |
Defined in Servant.Links | |
type ServerT (AuthProtect tag :> api :: Type) m Source # | |
Defined in Servant.Server.Experimental.Auth |
type family (mode :: k) :- api #
Instances
type AsApi :- api | |
Defined in Servant.API.Generic | |
type (AsLink a :: Type) :- api | |
Defined in Servant.Links | |
type (AsServerT m :: Type) :- api Source # | |
Defined in Servant.Server.Internal |
Instances
GenericMode AsApi | |||||
Defined in Servant.API.Generic Associated Types
| |||||
type AsApi :- api | |||||
Defined in Servant.API.Generic |
type GenericServant (routes :: k -> Type) (mode :: k) = (GenericMode mode, Generic (routes mode), GServantProduct (Rep (routes mode))) #
genericApi :: forall (routes :: Type -> Type). GenericServant routes AsApi => Proxy routes -> Proxy (ToServantApi routes) #
type QueryParam = QueryParam' '[Optional, Strict] #
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
(KnownSymbol h, ToHttpApiData v, new ~ Headers '[Header' mods h v] a) => AddHeader mods h v a new | |
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))) | |
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]) | |
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) | |
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
BuildHeadersTo ('[] :: [Type]) | |
Defined in Servant.API.ResponseHeaders Methods buildHeadersTo :: [Header] -> HList ('[] :: [Type]) # | |
(FromHttpApiData v, BuildHeadersTo xs, KnownSymbol h) => BuildHeadersTo (Header' mods h v ': xs) | |
Defined in Servant.API.ResponseHeaders Methods buildHeadersTo :: [Header] -> HList (Header' mods h v ': xs) # |
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
NFDataHList xs => NFData (HList xs) | |
Defined in Servant.API.ResponseHeaders | |
GetHeadersFromHList hs => GetHeaders (HList hs) | |
Defined in Servant.API.ResponseHeaders Methods getHeaders :: HList hs -> [Header] # |
class HasResponseHeader (h :: Symbol) a (headers :: [Type]) #
Minimal complete definition
hlistLookupHeader
Instances
HasResponseHeader h a (Header' mods h a ': rest) | |
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) | |
Defined in Servant.API.ResponseHeaders Methods hlistLookupHeader :: HList (first ': rest) -> ResponseHeader h 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 #
data NetstringFraming #
Instances
FramingRender NetstringFraming | |
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 | |
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
FramingRender NewlineFraming | |
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 | |
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 # |
Instances
FramingRender NoFraming | |
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 | |
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 StreamBody = StreamBody' ('[] :: [Type]) #
type StreamPost = Stream 'POST 200 #
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 StatusOf a :: Nat #
Instances
type StatusOf NoContent | |
Defined in Servant.API.UVerb | |
type StatusOf (Headers ls a) | |
Defined in Servant.API.UVerb | |
type StatusOf (WithStatus n a) | |
Defined in Servant.API.UVerb |
type DeleteAccepted = Verb 'DELETE 202 #
type DeleteNoContent = NoContentVerb 'DELETE #
type DeleteNonAuthoritative = Verb 'DELETE 203 #
type GetAccepted = Verb 'GET 202 #
type GetNoContent = NoContentVerb 'GET #
type GetNonAuthoritative = Verb 'GET 203 #
type GetPartialContent = Verb 'GET 206 #
type GetResetContent = Verb 'GET 205 #
type PatchAccepted = Verb 'PATCH 202 #
type PatchNoContent = NoContentVerb 'PATCH #
type PatchNonAuthoritative = Verb 'PATCH 203 #
type PostAccepted = Verb 'POST 202 #
type PostCreated = Verb 'POST 201 #
type PostNoContent = NoContentVerb 'POST #
type PostNonAuthoritative = Verb 'POST 203 #
type PostResetContent = Verb 'POST 205 #
type PutAccepted = Verb 'PUT 202 #
type PutCreated = Verb 'PUT 201 #
type PutNoContent = NoContentVerb 'PUT #
type PutNonAuthoritative = Verb 'PUT 203 #
class HasLink (endpoint :: k) where #
Instances
HasLink EmptyAPI | |
HasLink Raw | |
HasLink RawM | |
(TypeError (NoInstanceFor (HasLink api)) :: Constraint) => HasLink (api :: k) | |
(HasLink (ToServantApi routes), forall a. GLink routes a, ErrorIfNoGeneric routes) => HasLink (NamedRoutes routes :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (NamedRoutes routes) -> Link -> MkLink (NamedRoutes routes) a # | |
(HasLink a, HasLink b) => HasLink (a :<|> b :: Type) | |
HasLink (NoContentVerb m :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (NoContentVerb m) -> Link -> MkLink (NoContentVerb m) a # | |
(TypeError (PartialApplication (HasLink :: Type -> Constraint) arr) :: Constraint) => HasLink (arr :> sub :: Type) | |
(KnownSymbol sym, HasLink sub) => HasLink (sym :> sub :: Type) | |
HasLink sub => HasLink (HttpVersion :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (HttpVersion :> sub) -> Link -> MkLink (HttpVersion :> sub) a # | |
HasLink sub => HasLink (BasicAuth realm a :> sub :: Type) | |
(ToHttpApiData v, HasLink sub) => HasLink (Capture' mods sym v :> sub :: Type) | |
(ToHttpApiData v, HasLink sub) => HasLink (CaptureAll sym v :> sub :: Type) | |
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) | |
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) | |
HasLink sub => HasLink (AuthProtect tag :> sub :: Type) | |
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) | |
HasLink sub => HasLink (Header' mods sym a :> sub :: Type) | |
HasLink sub => HasLink (IsSecure :> sub :: Type) | |
(KnownSymbol sym, HasLink sub) => HasLink (QueryFlag sym :> sub :: Type) | |
(KnownSymbol sym, ToHttpApiData v, HasLink sub, SBoolI (FoldRequired mods)) => HasLink (QueryParam' mods sym v :> sub :: Type) | |
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) | |
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) | |
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) | |
HasLink sub => HasLink (StreamBody' mods framing ct a :> sub :: Type) | |
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) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (WithResource res :> sub) -> Link -> MkLink (WithResource res :> sub) a # | |
HasLink sub => HasLink (Vault :> sub :: Type) | |
(TypeError (NoInstanceForSub (HasLink :: Type -> Constraint) ty) :: Constraint) => HasLink (ty :> sub :: Type) | |
HasLink (UVerb m ct a :: Type) | |
HasLink sub => HasLink (WithNamedContext name context sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (WithNamedContext name context sub) -> Link -> MkLink (WithNamedContext name context sub) a # | |
HasLink (Verb m s ct a :: Type) | |
HasLink (Stream m status fr ct a :: Type) | |
Instances
Show Link | |
ToHttpApiData Link | |
Defined in Servant.Links Methods toUrlPiece :: Link -> Text # toEncodedUrlPiece :: Link -> Builder # toHeader :: Link -> ByteString # toQueryParam :: Link -> Text # toEncodedQueryParam :: Link -> Builder # |
type family MkLink (endpoint :: k) a #
Instances
type MkLink EmptyAPI a | |
Defined in Servant.Links | |
type MkLink Raw a | |
Defined in Servant.Links | |
type MkLink RawM a | |
Defined in Servant.Links | |
type MkLink (NamedRoutes routes :: Type) a | |
Defined in Servant.Links | |
type MkLink (a :<|> b :: Type) r | |
type MkLink (NoContentVerb m :: Type) r | |
Defined in Servant.Links | |
type MkLink (arr :> sub :: Type) _1 | |
Defined in Servant.Links | |
type MkLink (sym :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (HttpVersion :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (BasicAuth realm a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (Capture' mods sym v :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (CaptureAll sym v :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Description s :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Summary s :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (AuthProtect tag :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Fragment v :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Header' mods sym a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (IsSecure :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (QueryFlag sym :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (QueryParam' mods sym v :> sub :: Type) a | |
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 | |
Defined in Servant.Links | |
type MkLink (RemoteHost :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (ReqBody' mods ct a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (StreamBody' mods framing ct a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (WithResource res :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Vault :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (UVerb m ct a :: Type) r | |
Defined in Servant.Links | |
type MkLink (WithNamedContext name context sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Verb m s ct a :: Type) r | |
Defined in Servant.Links | |
type MkLink (Stream m status fr ct a :: Type) r | |
Defined in Servant.Links |
safeLink :: (IsElem endpoint api, HasLink endpoint) => Proxy api -> Proxy endpoint -> MkLink endpoint Link #
class ToHttpApiData a where #
Minimal complete definition
Methods
toUrlPiece :: a -> Text #
toEncodedUrlPiece :: a -> Builder #
toQueryParam :: a -> Text #
toEncodedQueryParam :: a -> Builder #
Instances
ToHttpApiData SetCookie | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: SetCookie -> Text # toEncodedUrlPiece :: SetCookie -> Builder # toHeader :: SetCookie -> ByteString # toQueryParam :: SetCookie -> Text # toEncodedQueryParam :: SetCookie -> Builder # | |
ToHttpApiData Void | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Void -> Text # toEncodedUrlPiece :: Void -> Builder # toHeader :: Void -> ByteString # toQueryParam :: Void -> Text # toEncodedQueryParam :: Void -> Builder # | |
ToHttpApiData All | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: All -> Text # toEncodedUrlPiece :: All -> Builder # toHeader :: All -> ByteString # toQueryParam :: All -> Text # toEncodedQueryParam :: All -> Builder # | |
ToHttpApiData Any | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Any -> Text # toEncodedUrlPiece :: Any -> Builder # toHeader :: Any -> ByteString # toQueryParam :: Any -> Text # toEncodedQueryParam :: Any -> Builder # | |
ToHttpApiData Version | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Version -> Text # toEncodedUrlPiece :: Version -> Builder # toHeader :: Version -> ByteString # toQueryParam :: Version -> Text # toEncodedQueryParam :: Version -> Builder # | |
ToHttpApiData Int16 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Int16 -> Text # toEncodedUrlPiece :: Int16 -> Builder # toHeader :: Int16 -> ByteString # toQueryParam :: Int16 -> Text # toEncodedQueryParam :: Int16 -> Builder # | |
ToHttpApiData Int32 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Int32 -> Text # toEncodedUrlPiece :: Int32 -> Builder # toHeader :: Int32 -> ByteString # toQueryParam :: Int32 -> Text # toEncodedQueryParam :: Int32 -> Builder # | |
ToHttpApiData Int64 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Int64 -> Text # toEncodedUrlPiece :: Int64 -> Builder # toHeader :: Int64 -> ByteString # toQueryParam :: Int64 -> Text # toEncodedQueryParam :: Int64 -> Builder # | |
ToHttpApiData Int8 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Int8 -> Text # toEncodedUrlPiece :: Int8 -> Builder # toHeader :: Int8 -> ByteString # toQueryParam :: Int8 -> Text # toEncodedQueryParam :: Int8 -> Builder # | |
ToHttpApiData Word16 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Word16 -> Text # toEncodedUrlPiece :: Word16 -> Builder # toHeader :: Word16 -> ByteString # toQueryParam :: Word16 -> Text # toEncodedQueryParam :: Word16 -> Builder # | |
ToHttpApiData Word32 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Word32 -> Text # toEncodedUrlPiece :: Word32 -> Builder # toHeader :: Word32 -> ByteString # toQueryParam :: Word32 -> Text # toEncodedQueryParam :: Word32 -> Builder # | |
ToHttpApiData Word64 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Word64 -> Text # toEncodedUrlPiece :: Word64 -> Builder # toHeader :: Word64 -> ByteString # toQueryParam :: Word64 -> Text # toEncodedQueryParam :: Word64 -> Builder # | |
ToHttpApiData Word8 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Word8 -> Text # toEncodedUrlPiece :: Word8 -> Builder # toHeader :: Word8 -> ByteString # toQueryParam :: Word8 -> Text # toEncodedQueryParam :: Word8 -> Builder # | |
ToHttpApiData Ordering | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Ordering -> Text # toEncodedUrlPiece :: Ordering -> Builder # toHeader :: Ordering -> ByteString # toQueryParam :: Ordering -> Text # toEncodedQueryParam :: Ordering -> Builder # | |
ToHttpApiData Link | |
Defined in Servant.Links Methods toUrlPiece :: Link -> Text # toEncodedUrlPiece :: Link -> Builder # toHeader :: Link -> ByteString # toQueryParam :: Link -> Text # toEncodedQueryParam :: Link -> Builder # | |
ToHttpApiData Text | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Text -> Text # toEncodedUrlPiece :: Text -> Builder # toHeader :: Text -> ByteString # toQueryParam :: Text -> Text # toEncodedQueryParam :: Text -> Builder # | |
ToHttpApiData Text | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Text -> Text # toEncodedUrlPiece :: Text -> Builder # toHeader :: Text -> ByteString # toQueryParam :: Text -> Text # toEncodedQueryParam :: Text -> Builder # | |
ToHttpApiData Day | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Day -> Text # toEncodedUrlPiece :: Day -> Builder # toHeader :: Day -> ByteString # toQueryParam :: Day -> Text # toEncodedQueryParam :: Day -> Builder # | |
ToHttpApiData Month | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Month -> Text # toEncodedUrlPiece :: Month -> Builder # toHeader :: Month -> ByteString # toQueryParam :: Month -> Text # toEncodedQueryParam :: Month -> Builder # | |
ToHttpApiData Quarter | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Quarter -> Text # toEncodedUrlPiece :: Quarter -> Builder # toHeader :: Quarter -> ByteString # toQueryParam :: Quarter -> Text # toEncodedQueryParam :: Quarter -> Builder # | |
ToHttpApiData QuarterOfYear | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: QuarterOfYear -> Text # toEncodedUrlPiece :: QuarterOfYear -> Builder # toHeader :: QuarterOfYear -> ByteString # toQueryParam :: QuarterOfYear -> Text # toEncodedQueryParam :: QuarterOfYear -> Builder # | |
ToHttpApiData DayOfWeek | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: DayOfWeek -> Text # toEncodedUrlPiece :: DayOfWeek -> Builder # toHeader :: DayOfWeek -> ByteString # toQueryParam :: DayOfWeek -> Text # toEncodedQueryParam :: DayOfWeek -> Builder # | |
ToHttpApiData NominalDiffTime | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: NominalDiffTime -> Text # toEncodedUrlPiece :: NominalDiffTime -> Builder # toHeader :: NominalDiffTime -> ByteString # toQueryParam :: NominalDiffTime -> Text # toEncodedQueryParam :: NominalDiffTime -> Builder # | |
ToHttpApiData UTCTime | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: UTCTime -> Text # toEncodedUrlPiece :: UTCTime -> Builder # toHeader :: UTCTime -> ByteString # toQueryParam :: UTCTime -> Text # toEncodedQueryParam :: UTCTime -> Builder # | |
ToHttpApiData LocalTime | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: LocalTime -> Text # toEncodedUrlPiece :: LocalTime -> Builder # toHeader :: LocalTime -> ByteString # toQueryParam :: LocalTime -> Text # toEncodedQueryParam :: LocalTime -> Builder # | |
ToHttpApiData TimeOfDay | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: TimeOfDay -> Text # toEncodedUrlPiece :: TimeOfDay -> Builder # toHeader :: TimeOfDay -> ByteString # toQueryParam :: TimeOfDay -> Text # toEncodedQueryParam :: TimeOfDay -> Builder # | |
ToHttpApiData ZonedTime | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: ZonedTime -> Text # toEncodedUrlPiece :: ZonedTime -> Builder # toHeader :: ZonedTime -> ByteString # toQueryParam :: ZonedTime -> Text # toEncodedQueryParam :: ZonedTime -> Builder # | |
ToHttpApiData UUID | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: UUID -> Text # toEncodedUrlPiece :: UUID -> Builder # toHeader :: UUID -> ByteString # toQueryParam :: UUID -> Text # toEncodedQueryParam :: UUID -> Builder # | |
ToHttpApiData Integer | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Integer -> Text # toEncodedUrlPiece :: Integer -> Builder # toHeader :: Integer -> ByteString # toQueryParam :: Integer -> Text # toEncodedQueryParam :: Integer -> Builder # | |
ToHttpApiData Natural | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Natural -> Text # toEncodedUrlPiece :: Natural -> Builder # toHeader :: Natural -> ByteString # toQueryParam :: Natural -> Text # toEncodedQueryParam :: Natural -> Builder # | |
ToHttpApiData String | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: String -> Text # toEncodedUrlPiece :: String -> Builder # toHeader :: String -> ByteString # toQueryParam :: String -> Text # toEncodedQueryParam :: String -> Builder # | |
ToHttpApiData () | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: () -> Text # toEncodedUrlPiece :: () -> Builder # toHeader :: () -> ByteString # toQueryParam :: () -> Text # toEncodedQueryParam :: () -> Builder # | |
ToHttpApiData Bool | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Bool -> Text # toEncodedUrlPiece :: Bool -> Builder # toHeader :: Bool -> ByteString # toQueryParam :: Bool -> Text # toEncodedQueryParam :: Bool -> Builder # | |
ToHttpApiData Char | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Char -> Text # toEncodedUrlPiece :: Char -> Builder # toHeader :: Char -> ByteString # toQueryParam :: Char -> Text # toEncodedQueryParam :: Char -> Builder # | |
ToHttpApiData Double | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Double -> Text # toEncodedUrlPiece :: Double -> Builder # toHeader :: Double -> ByteString # toQueryParam :: Double -> Text # toEncodedQueryParam :: Double -> Builder # | |
ToHttpApiData Float | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Float -> Text # toEncodedUrlPiece :: Float -> Builder # toHeader :: Float -> ByteString # toQueryParam :: Float -> Text # toEncodedQueryParam :: Float -> Builder # | |
ToHttpApiData Int | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Int -> Text # toEncodedUrlPiece :: Int -> Builder # toHeader :: Int -> ByteString # toQueryParam :: Int -> Text # toEncodedQueryParam :: Int -> Builder # | |
ToHttpApiData Word | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Word -> Text # toEncodedUrlPiece :: Word -> Builder # toHeader :: Word -> ByteString # toQueryParam :: Word -> Text # toEncodedQueryParam :: Word -> Builder # | |
ToHttpApiData a => ToHttpApiData (First a) | |
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) | |
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) | |
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) | |
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 (Identity a) | |
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) | |
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) | |
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 (Dual a) | |
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) | |
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) | |
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) | |
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 # | |
HasResolution a => ToHttpApiData (Fixed a) | |
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 b) => ToHttpApiData (Either a b) | |
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 # | |
ToHttpApiData a => ToHttpApiData (Const a b) | |
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) | |
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 # |
Constructors
URI | |
Fields
|
Instances
NFData URI | |||||
Defined in Network.URI | |||||
Data URI | |||||
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 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 | |||||
Defined in Network.URI Associated Types
| |||||
Show URI | |||||
Eq URI | |||||
Ord URI | |||||
Lift URI | |||||
type Rep URI | |||||
Defined in Network.URI type Rep URI = D1 ('MetaData "URI" "Network.URI" "network-uri-2.6.4.2-GTqI74Lt4lJDBgalj7yv6f" '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))))) |
For implementing servers for servant APIs.
module Servant.Server
Utilities on top of the servant core
class FragmentUnique api => AtMostOneFragment api #
Instances
AtMostOneFragment (Fragment a) | |
Defined in Servant.API.TypeLevel | |
AtMostOneFragment (UVerb m cts as) | |
Defined in Servant.API.TypeLevel | |
AtMostOneFragment (Verb m s ct typ) | |
Defined in Servant.API.TypeLevel |
type family FragmentUnique api where ... #
Equations
FragmentUnique (sa :<|> sb) = And (FragmentUnique sa) (FragmentUnique sb) | |
FragmentUnique (Fragment a :> sa) = FragmentNotIn sa (Fragment a :> sa) | |
FragmentUnique (x :> sa) = FragmentUnique sa | |
FragmentUnique (Fragment a) = () | |
FragmentUnique x = () |
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 |
class HasLink (endpoint :: k) where #
Instances
HasLink EmptyAPI | |
HasLink Raw | |
HasLink RawM | |
(TypeError (NoInstanceFor (HasLink api)) :: Constraint) => HasLink (api :: k) | |
(HasLink (ToServantApi routes), forall a. GLink routes a, ErrorIfNoGeneric routes) => HasLink (NamedRoutes routes :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (NamedRoutes routes) -> Link -> MkLink (NamedRoutes routes) a # | |
(HasLink a, HasLink b) => HasLink (a :<|> b :: Type) | |
HasLink (NoContentVerb m :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (NoContentVerb m) -> Link -> MkLink (NoContentVerb m) a # | |
(TypeError (PartialApplication (HasLink :: Type -> Constraint) arr) :: Constraint) => HasLink (arr :> sub :: Type) | |
(KnownSymbol sym, HasLink sub) => HasLink (sym :> sub :: Type) | |
HasLink sub => HasLink (HttpVersion :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (HttpVersion :> sub) -> Link -> MkLink (HttpVersion :> sub) a # | |
HasLink sub => HasLink (BasicAuth realm a :> sub :: Type) | |
(ToHttpApiData v, HasLink sub) => HasLink (Capture' mods sym v :> sub :: Type) | |
(ToHttpApiData v, HasLink sub) => HasLink (CaptureAll sym v :> sub :: Type) | |
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) | |
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) | |
HasLink sub => HasLink (AuthProtect tag :> sub :: Type) | |
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) | |
HasLink sub => HasLink (Header' mods sym a :> sub :: Type) | |
HasLink sub => HasLink (IsSecure :> sub :: Type) | |
(KnownSymbol sym, HasLink sub) => HasLink (QueryFlag sym :> sub :: Type) | |
(KnownSymbol sym, ToHttpApiData v, HasLink sub, SBoolI (FoldRequired mods)) => HasLink (QueryParam' mods sym v :> sub :: Type) | |
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) | |
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) | |
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) | |
HasLink sub => HasLink (StreamBody' mods framing ct a :> sub :: Type) | |
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) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (WithResource res :> sub) -> Link -> MkLink (WithResource res :> sub) a # | |
HasLink sub => HasLink (Vault :> sub :: Type) | |
(TypeError (NoInstanceForSub (HasLink :: Type -> Constraint) ty) :: Constraint) => HasLink (ty :> sub :: Type) | |
HasLink (UVerb m ct a :: Type) | |
HasLink sub => HasLink (WithNamedContext name context sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (WithNamedContext name context sub) -> Link -> MkLink (WithNamedContext name context sub) a # | |
HasLink (Verb m s ct a :: Type) | |
HasLink (Stream m status fr ct a :: Type) | |
Instances
Show Link | |
ToHttpApiData Link | |
Defined in Servant.Links Methods toUrlPiece :: Link -> Text # toEncodedUrlPiece :: Link -> Builder # toHeader :: Link -> ByteString # toQueryParam :: Link -> Text # toEncodedQueryParam :: Link -> Builder # |
type family MkLink (endpoint :: k) a #
Instances
type MkLink EmptyAPI a | |
Defined in Servant.Links | |
type MkLink Raw a | |
Defined in Servant.Links | |
type MkLink RawM a | |
Defined in Servant.Links | |
type MkLink (NamedRoutes routes :: Type) a | |
Defined in Servant.Links | |
type MkLink (a :<|> b :: Type) r | |
type MkLink (NoContentVerb m :: Type) r | |
Defined in Servant.Links | |
type MkLink (arr :> sub :: Type) _1 | |
Defined in Servant.Links | |
type MkLink (sym :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (HttpVersion :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (BasicAuth realm a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (Capture' mods sym v :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (CaptureAll sym v :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Description s :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Summary s :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (AuthProtect tag :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Fragment v :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Header' mods sym a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (IsSecure :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (QueryFlag sym :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (QueryParam' mods sym v :> sub :: Type) a | |
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 | |
Defined in Servant.Links | |
type MkLink (RemoteHost :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (ReqBody' mods ct a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (StreamBody' mods framing ct a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (WithResource res :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Vault :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (UVerb m ct a :: Type) r | |
Defined in Servant.Links | |
type MkLink (WithNamedContext name context sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Verb m s ct a :: Type) r | |
Defined in Servant.Links | |
type MkLink (Stream m status fr ct a :: Type) r | |
Defined in Servant.Links |
safeLink :: (IsElem endpoint api, HasLink endpoint) => Proxy api -> Proxy endpoint -> MkLink endpoint Link #
Constructors
URI | |
Fields
|
Instances
NFData URI | |||||
Defined in Network.URI | |||||
Data URI | |||||
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 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 | |||||
Defined in Network.URI Associated Types
| |||||
Show URI | |||||
Eq URI | |||||
Ord URI | |||||
Lift URI | |||||
type Rep URI | |||||
Defined in Network.URI type Rep URI = D1 ('MetaData "URI" "Network.URI" "network-uri-2.6.4.2-GTqI74Lt4lJDBgalj7yv6f" '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))))) |
type family AppendList (xs :: [a]) (ys :: [a]) :: [a] where ... #
Equations
AppendList ('[] :: [a]) (ys :: [a]) = ys | |
AppendList (x ': xs :: [a]) (ys :: [a]) = x ': AppendList xs ys |
type family IsStrictSubAPI sub api where ... #
Equations
IsStrictSubAPI sub api = AllIsIn (Endpoints sub) api |
data LinkArrayElementStyle #
Constructors
LinkArrayElementBracket | |
LinkArrayElementPlain |
Instances
Bounded LinkArrayElementStyle | |
Defined in Servant.Links | |
Enum LinkArrayElementStyle | |
Defined in Servant.Links Methods succ :: LinkArrayElementStyle -> LinkArrayElementStyle pred :: LinkArrayElementStyle -> LinkArrayElementStyle toEnum :: Int -> LinkArrayElementStyle fromEnum :: LinkArrayElementStyle -> Int enumFrom :: LinkArrayElementStyle -> [LinkArrayElementStyle] enumFromThen :: LinkArrayElementStyle -> LinkArrayElementStyle -> [LinkArrayElementStyle] enumFromTo :: LinkArrayElementStyle -> LinkArrayElementStyle -> [LinkArrayElementStyle] enumFromThenTo :: LinkArrayElementStyle -> LinkArrayElementStyle -> LinkArrayElementStyle -> [LinkArrayElementStyle] | |
Show LinkArrayElementStyle | |
Defined in Servant.Links Methods showsPrec :: Int -> LinkArrayElementStyle -> ShowS show :: LinkArrayElementStyle -> String showList :: [LinkArrayElementStyle] -> ShowS | |
Eq LinkArrayElementStyle | |
Defined in Servant.Links Methods (==) :: LinkArrayElementStyle -> LinkArrayElementStyle -> Bool (/=) :: LinkArrayElementStyle -> LinkArrayElementStyle -> Bool | |
Ord LinkArrayElementStyle | |
Defined in Servant.Links Methods compare :: LinkArrayElementStyle -> LinkArrayElementStyle -> Ordering (<) :: LinkArrayElementStyle -> LinkArrayElementStyle -> Bool (<=) :: LinkArrayElementStyle -> LinkArrayElementStyle -> Bool (>) :: LinkArrayElementStyle -> LinkArrayElementStyle -> Bool (>=) :: LinkArrayElementStyle -> LinkArrayElementStyle -> Bool max :: LinkArrayElementStyle -> LinkArrayElementStyle -> LinkArrayElementStyle min :: LinkArrayElementStyle -> LinkArrayElementStyle -> LinkArrayElementStyle |
Instances
GenericMode (AsLink a :: Type) | |
Defined in Servant.Links | |
type (AsLink a :: Type) :- api | |
Defined in Servant.Links |
Constructors
SingleParam String Text | |
ArrayElemParam String Text | |
FlagParam String |
allFieldLinks :: (HasLink (ToServantApi routes), GenericServant routes (AsLink Link), ToServant routes (AsLink Link) ~ MkLink (ToServantApi routes) Link) => routes (AsLink Link) #
allFieldLinks' :: (HasLink (ToServantApi routes), GenericServant routes (AsLink a), ToServant routes (AsLink a) ~ MkLink (ToServantApi routes) a) => (Link -> a) -> routes (AsLink a) #
fieldLink :: (IsElem endpoint (ToServantApi routes), HasLink endpoint, GenericServant routes AsApi) => (routes AsApi -> endpoint) -> MkLink endpoint Link #
fieldLink' :: forall routes endpoint a. (IsElem endpoint (ToServantApi routes), HasLink endpoint, GenericServant routes AsApi) => (Link -> a) -> (routes AsApi -> endpoint) -> MkLink endpoint a #
linkFragment :: Link -> Fragment' #
linkQueryParams :: Link -> [Param] #
linkSegments :: Link -> [String] #
linkURI' :: LinkArrayElementStyle -> Link -> URI #
safeLink' :: (IsElem endpoint api, HasLink endpoint) => (Link -> a) -> Proxy api -> Proxy endpoint -> MkLink endpoint a #
module Servant.Server.StaticFiles
Useful re-exports
Constructors
Proxy |
Instances
Generic1 (Proxy :: k -> Type) | |||||
Defined in GHC.Internal.Generics Associated Types
| |||||
MonadZip (Proxy :: Type -> Type) | |||||
Eq1 (Proxy :: Type -> Type) | |||||
Defined in Data.Functor.Classes | |||||
Ord1 (Proxy :: Type -> Type) | |||||
Defined in Data.Functor.Classes Methods liftCompare :: (a -> b -> Ordering) -> Proxy a -> Proxy b -> Ordering | |||||
Read1 (Proxy :: Type -> Type) | |||||
Defined in Data.Functor.Classes Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Proxy a) liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Proxy a] liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Proxy a) liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Proxy a] | |||||
Show1 (Proxy :: Type -> Type) | |||||
Defined in Data.Functor.Classes Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Proxy a -> ShowS liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Proxy a] -> ShowS | |||||
Contravariant (Proxy :: Type -> Type) | |||||
NFData1 (Proxy :: Type -> Type) | |||||
Defined in Control.DeepSeq | |||||
Alternative (Proxy :: Type -> Type) | |||||
Applicative (Proxy :: Type -> Type) | |||||
Functor (Proxy :: Type -> Type) | |||||
Monad (Proxy :: Type -> Type) | |||||
MonadPlus (Proxy :: Type -> Type) | |||||
Foldable (Proxy :: Type -> Type) | |||||
Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Proxy m -> m foldMap :: Monoid m => (a -> m) -> Proxy a -> m foldMap' :: Monoid m => (a -> m) -> Proxy a -> m foldr :: (a -> b -> b) -> b -> Proxy a -> b foldr' :: (a -> b -> b) -> b -> Proxy a -> b foldl :: (b -> a -> b) -> b -> Proxy a -> b foldl' :: (b -> a -> b) -> b -> Proxy a -> b foldr1 :: (a -> a -> a) -> Proxy a -> a foldl1 :: (a -> a -> a) -> Proxy a -> a elem :: Eq a => a -> Proxy a -> Bool maximum :: Ord a => Proxy a -> a | |||||
Traversable (Proxy :: Type -> Type) | |||||
Hashable1 (Proxy :: Type -> Type) | |||||
Defined in Data.Hashable.Class Methods liftHashWithSalt :: (Int -> a -> Int) -> Int -> Proxy a -> Int | |||||
NFData (Proxy a) | |||||
Defined in Control.DeepSeq | |||||
Monoid (Proxy s) | |||||
Semigroup (Proxy s) | |||||
Bounded (Proxy t) | |||||
Defined in GHC.Internal.Data.Proxy | |||||
Enum (Proxy s) | |||||
Defined in GHC.Internal.Data.Proxy | |||||
Generic (Proxy t) | |||||
Defined in GHC.Internal.Generics Associated Types
| |||||
Ix (Proxy s) | |||||
Defined in GHC.Internal.Data.Proxy | |||||
Read (Proxy t) | |||||
Defined in GHC.Internal.Data.Proxy | |||||
Show (Proxy s) | |||||
Eq (Proxy s) | |||||
Ord (Proxy s) | |||||
Hashable (Proxy a) | |||||
Defined in Data.Hashable.Class | |||||
type Rep1 (Proxy :: k -> Type) | |||||
Defined in GHC.Internal.Generics type Rep1 (Proxy :: k -> Type) = D1 ('MetaData "Proxy" "GHC.Internal.Data.Proxy" "ghc-internal" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) (U1 :: k -> Type)) | |||||
type Rep (Proxy t) | |||||
Defined in GHC.Internal.Generics type Rep (Proxy t) = D1 ('MetaData "Proxy" "GHC.Internal.Data.Proxy" "ghc-internal" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) (U1 :: Type -> Type)) |
throwError :: MonadError e m => e -> m a #