nested-routes-7.0.0: Declarative, compositional Wai responses

Safe HaskellNone
LanguageHaskell2010

Web.Routes.Nested.Types

Synopsis

Documentation

data Tries x s Source

The internal data structure built during route declaration.

Constructors

Tries 

Fields

trieContent :: !(RootedPredTrie Text x)
 
trieCatchAll :: !(RootedPredTrie Text x)
 
trieSecurity :: !(RootedPredTrie Text s)
 

Instances

Monoid (Tries x s) Source 
Monad m => MonadState (Tries x sec) (HandlerT x sec m) Source 

newtype HandlerT x sec m a Source

The return type of a route building expression like match - it should have a shape of HandlerT (MiddlewareT m) (SecurityToken s) m a when used with route.

Constructors

HandlerT 

Fields

runHandlerT :: StateT (Tries x sec) m a
 

Instances

MonadTrans (HandlerT x sec) Source 
Monad m => MonadState (Tries x sec) (HandlerT x sec m) Source 
Monad m => Monad (HandlerT x sec m) Source 
Functor m => Functor (HandlerT x sec m) Source 
Monad m => Applicative (HandlerT x sec m) Source 
MonadIO m => MonadIO (HandlerT x sec m) Source 

execHandlerT :: Monad m => HandlerT x sec m a -> m (Tries x sec) Source

Run the monad, only getting the built state and throwing away a.

type ExtrudeSoundly cleanxs xs c r = (cleanxs ~ CatMaybes xs, ArityTypeListIso c cleanxs r, Extrude (UrlChunks xs) (RootedPredTrie Text c) (RootedPredTrie Text r)) Source

Deductive proof that prepending a list of types to a function as arity can be deconstructed.

type ActionT m a = VerbListenerT (FileExtListenerT m a) m a Source

The type of content builders.

action :: Monad m => ActionT m () -> MiddlewareT m Source

Run the content builder into a middleware that responds when the content is satisfiable (i.e. Accept headers are O.K., etc.)