packages feed

web-routes 0.26.3 → 0.27.1

raw patch · 2 files changed

+5/−3 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Web.Routes.RouteT: class Monad m => MonadRoute m where { type family URL m; }
+ Web.Routes.RouteT: class Monad m => MonadRoute m where type family URL m
- Web.Routes.Site: runSite :: Text -> Site url a -> ByteString -> (Either String a)
+ Web.Routes.Site: runSite :: Text -> Site url a -> [Text] -> (Either String a)

Files

Web/Routes/Site.hs view
@@ -51,12 +51,14 @@   fmap f site = site { handleSite = \showFn u -> f (handleSite site showFn u) }  -- | Retrieve the application to handle a given request.+--+-- NOTE: use 'decodePathInfo' to convert a 'ByteString' url to a properly decoded list of path segments runSite :: Text -- ^ application root, with trailing slash         -> Site url a-        -> ByteString -- ^ path info, leading slash stripped+        -> [Text] -- ^ path info, (call 'decodePathInfo' on path with leading slash stripped)         -> (Either String a) runSite approot site pathInfo =-    case parsePathSegments site $ decodePathInfo pathInfo of+    case parsePathSegments site pathInfo of         (Left errs) -> (Left errs)         (Right url) -> Right $ handleSite site showFn url   where
web-routes.cabal view
@@ -1,5 +1,5 @@ Name:             web-routes-Version:          0.26.3+Version:          0.27.1 License:          BSD3 License-File:     LICENSE Author:           jeremy@seereason.com