Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Router = Router' Void
- data Router' i (ts :: Type) m where
- Piece :: Text -> Router' i ts m -> Router' i ts m
- QueryParam :: forall a presence parsing m ts i. (Introspection i QueryParam a, IsRequired presence, IsLenient parsing) => ByteString -> (MakeError -> Maybe (Maybe ByteString) -> m (Arg presence parsing a)) -> Router' i (ts :+ WithQueryParam presence parsing m a) m -> Router' i ts m
- Captures :: forall a ts m i. Introspection i Captures a => (MakeError -> [Text] -> m [a]) -> Text -> Router' i (ts :+ WithPieces a) m -> Router' i ts m
- Capture :: forall a ts m i. Introspection i Capture a => (MakeError -> Text -> m a) -> Text -> Router' i (ts :+ WithPiece a) m -> Router' i ts m
- Middleware :: MiddlewareM m -> Router' i ts m -> Router' i ts m
- Header :: forall a presence parsing m ts i. (Introspection i Header a, IsRequired presence, IsLenient parsing) => HeaderName -> (MakeError -> [ByteString] -> m (Arg presence parsing a)) -> Router' i (ts :+ WithHeader presence parsing m a) m -> Router' i ts m
- Request :: forall r m i ts. (Introspection i Request r, IsRequest r) => (ErrorBuilder -> Request -> m r) -> Router' i (ts :+ WithReq m r) m -> Router' i ts m
- Alt :: [Router' i ts m] -> Router' i ts m
- Handle :: forall o m ts i st. (HandleArgs ts st m, ToResponse m o, CanRespond o, Introspection i Response o) => Method -> (HList (DelayedArgs st) -> m o) -> Router' i ts m
- Description :: Introspection i Description desc => desc -> Router' i ts m -> Router' i ts m
- MapArgs :: forall m ts ts' i. (RHList ts -> RHList ts') -> Router' i ts' m -> Router' i ts m
- HideIntrospection :: forall i' i ts m. Router' i ts m -> Router' i' ts m
- type Combinator i ts m = Router' i ts m -> Router' i ts m
- type ValueCombinator i v ts m = Router' i (ts :+ v) m -> Router' i ts m
- type MakeError = Status -> ByteString -> ServerError
Documentation
data Router' i (ts :: Type) m where Source #
Piece | |
QueryParam | |
| |
Captures | |
| |
Capture | |
Middleware :: MiddlewareM m -> Router' i ts m -> Router' i ts m | |
Header | |
| |
Request | |
| |
Alt | |
Handle | |
| |
Description | |
| |
MapArgs :: forall m ts ts' i. (RHList ts -> RHList ts') -> Router' i ts' m -> Router' i ts m | |
HideIntrospection :: forall i' i ts m. Router' i ts m -> Router' i' ts m |
Instances
type Combinator i ts m = Router' i ts m -> Router' i ts m Source #
type MakeError = Status -> ByteString -> ServerError Source #