Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type family ApplicationLS x where ...
- type family ApplicationRS x where ...
- class ApiHasArgClass api where
- type ApiArg api :: Type
- apiArgName :: Proxy api -> String
- type ApiHasArg subApi res = (ApiHasArgClass subApi, ApiHasArgInvariant subApi res Handler)
- inRouteServer :: forall api api' ctx env. (Proxy api -> Context ctx -> Delayed env (Server api) -> Router env) -> (Server api' -> Server api) -> Proxy api' -> Context ctx -> Delayed env (Server api') -> Router env
- symbolValT :: forall s. KnownSymbol s => Text
- data NameLabel (name :: Symbol) = NameLabel
Documentation
type family ApplicationLS x where ... Source #
ApplicationLS (a b) = a |
type family ApplicationRS x where ... Source #
Extract right side of type application.
ApplicationRS (a b) = b |
class ApiHasArgClass api where Source #
Proves info about argument specifier of servant API.
Nothing
type ApiArg api :: Type Source #
For arguments-specifiers of API, get argument type.
E.g. Capture "cap" Int
-> Int
.
type ApiArg api = ApplicationRS api
apiArgName :: Proxy api -> String Source #
Name of argument.
E.g. name of argument specified by Capture "nyan"
is nyan.
default apiArgName :: forall n someApiType a. (KnownSymbol n, api ~ someApiType n a) => Proxy api -> String Source #
Instances
KnownSymbol s => ApiHasArgClass (QueryFlag s) Source # | |
ApiHasArgClass (ReqBody ct a) Source # | |
KnownSymbol s => ApiHasArgClass (Capture s a) Source # | |
KnownSymbol s => ApiHasArgClass (QueryParam' mods s a) Source # | |
Defined in Servant.Util.Common.Common type ApiArg (QueryParam' mods s a) Source # apiArgName :: Proxy (QueryParam' mods s a) -> String Source # |
type ApiHasArg subApi res = (ApiHasArgClass subApi, ApiHasArgInvariant subApi res Handler) Source #
inRouteServer :: forall api api' ctx env. (Proxy api -> Context ctx -> Delayed env (Server api) -> Router env) -> (Server api' -> Server api) -> Proxy api' -> Context ctx -> Delayed env (Server api') -> Router env Source #
Modify handler in implementation of route
.
symbolValT :: forall s. KnownSymbol s => Text Source #
Similar to symbolVal
, but shorter in use.