packages feed

wai-routing 0.11 → 0.11.1

raw patch · 4 files changed

+8/−4 lines, 4 files

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+0.11.1+-----------------------------------------------------------------------------+- Bugfix release+ 0.11 ----------------------------------------------------------------------------- - Change error renderer to return text and optionally additional response
examples/eval-routing.hs view
@@ -6,7 +6,7 @@ module Main (main) where  import Data.Attoparsec.ByteString.Char8-import Data.ByteString.From+import Data.ByteString.Conversion import Data.String import Network.HTTP.Types import Network.Wai
src/Network/Wai/Routing/Route.hs view
@@ -2,6 +2,7 @@ -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. +{-# LANGUAGE BangPatterns        #-} {-# LANGUAGE GADTs               #-} {-# LANGUAGE OverloadedStrings   #-} {-# LANGUAGE ScopedTypeVariables #-}@@ -184,8 +185,7 @@ -- Note that @route (prepare ...)@ behaves like a WAI 'Application' generalised to -- arbitrary monads. route :: Monad m => [(ByteString, App m)] -> Request -> Continue m -> m ResponseReceived-route rm rq k = do-    let tr = Tree.fromList rm+route rm = let !tr = Tree.fromList rm in \rq k ->     case Tree.lookup tr (Tree.segments $ rawPathInfo rq) of         Just (f, v) -> f (fromReq v (fromRequest rq)) k         Nothing     -> k notFound
wai-routing.cabal view
@@ -1,5 +1,5 @@ name:                wai-routing-version:             0.11+version:             0.11.1 synopsis:            Declarative routing for WAI. license:             OtherLicense license-file:        LICENSE