minion-0.1.0.0: A Haskell introspectable web router
Safe HaskellSafe-Inferred
LanguageHaskell2010

Web.Minion.Router.Internal

Synopsis

Documentation

type Router = Router' Void Source #

If you don't care about introspection

type ValueCombinator i v ts m = Router' i (ts :+ v) m -> Router' i ts m Source #

type Combinator i ts m = Router' i ts m -> Router' i ts m Source #

data Router' i (ts :: Type) m where Source #

Constructors

Piece 

Fields

QueryParam 

Fields

Captures 

Fields

Capture 

Fields

Middleware :: MiddlewareM m -> Router' i ts m -> Router' i ts m 
Header 

Fields

Request 

Fields

Alt 

Fields

Handle 

Fields

Description 

Fields

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

Instances details
IsString (Combinator i ts m) Source # 
Instance details

Defined in Web.Minion.Router.Internal

Methods

fromString :: String -> Combinator i ts m #

Monoid (Router' i ts r) Source # 
Instance details

Defined in Web.Minion.Router.Internal

Methods

mempty :: Router' i ts r #

mappend :: Router' i ts r -> Router' i ts r -> Router' i ts r #

mconcat :: [Router' i ts r] -> Router' i ts r #

Semigroup (Router' i ts r) Source # 
Instance details

Defined in Web.Minion.Router.Internal

Methods

(<>) :: Router' i ts r -> Router' i ts r -> Router' i ts r #

sconcat :: NonEmpty (Router' i ts r) -> Router' i ts r #

stimes :: Integral b => b -> Router' i ts r -> Router' i ts r #

IsList (Router' i ts r) Source # 
Instance details

Defined in Web.Minion.Router.Internal

Associated Types

type Item (Router' i ts r) #

Methods

fromList :: [Item (Router' i ts r)] -> Router' i ts r #

fromListN :: Int -> [Item (Router' i ts r)] -> Router' i ts r #

toList :: Router' i ts r -> [Item (Router' i ts r)] #

type Item (Router' i ts r) Source # 
Instance details

Defined in Web.Minion.Router.Internal

type Item (Router' i ts r) = Router' i ts r

route :: forall m ts i. (MonadIO m, MonadCatch m) => ErrorBuilders -> RoutingState -> RHList ts -> Router' i ts m -> ApplicationM m Source #

routeHandle :: forall m o ts st. (MonadIO m, ToResponse m o, CanRespond o, HandleArgs ts st m) => [Text] -> RHList ts -> Method -> (HList (DelayedArgs st) -> m o) -> ApplicationM m Source #

goThrough :: (MonadIO m, MonadCatch m) => [m b] -> m b Source #

throwMIO :: (Exception e, MonadIO m) => e -> m a Source #

checkHandler :: MonadIO f => Request -> [Text] -> Method -> f () Source #

newtype RoutingState Source #

Constructors

RoutingState 

Fields

makeHandle :: forall f o m ts i st. (HandleArgs ts st m, ToResponse m (f o), CanRespond (f o), Introspection i Response (f o)) => Method -> (o -> f o) -> (DelayedArgs st ~> m o) -> Router' i ts m Source #