-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Minimalistic, efficient routing for WAI
--   
--   Simple routing for applications using the WAI, based on an efficient
--   tree structure. Routes are defined as string literals and path
--   segments prefixed with a <a>:</a> indicate captures.
--   
--   A sample is available at:
--   <a>https://github.com/romanb/wai-route/blob/master/sample/Main.hs</a>.
@package wai-route
@version 0.3.1.2

module Network.Wai.Route.Tree
data Tree a
fromList :: [(ByteString, a)] -> Tree a
lookup :: Tree a -> [ByteString] -> Maybe (Payload a)
foldTree :: (Payload a -> b -> b) -> b -> Tree a -> b
mapTree :: (Payload a -> Payload b) -> Tree a -> Tree b
toList :: Tree a -> [Payload a]
segments :: ByteString -> [ByteString]
data Payload a
value :: Payload a -> a
path :: Payload a -> ByteString
captures :: Payload a -> Captures
data Captures
captured :: Captures -> [(ByteString, ByteString)]
captureParams :: Captures -> [ByteString]
captureValues :: Captures -> [ByteString]
instance GHC.Base.Monoid (Network.Wai.Route.Tree.Tree a)

module Network.Wai.Route

-- | A <a>Handler</a> is a generalized <a>Application</a> that receives the
--   captured path parameters as its first argument.
type Handler m = [(ByteString, ByteString)]  The captured path parameters. -> Request  The matched 'Request'. -> (Response -> m ResponseReceived)  The continuation. -> m ResponseReceived

-- | Routes requests to <a>Handler</a>s according to a routing table.
route :: Monad m => [(ByteString, Handler m)] -> Request -> (Response -> m ResponseReceived) -> m ResponseReceived
