packages feed

web-routes 0.27.8 → 0.27.9

raw patch · 2 files changed

+17/−3 lines, 2 filesdep +exceptionsdep ~basedep ~blaze-builderdep ~utf8-stringPVP ok

version bump matches the API change (PVP)

Dependencies added: exceptions

Dependency ranges changed: base, blaze-builder, utf8-string

API changes (from Hackage documentation)

+ Web.Routes.RouteT: instance MonadCatch m => MonadCatch (RouteT url m)
+ Web.Routes.RouteT: instance MonadThrow m => MonadThrow (RouteT url m)

Files

Web/Routes/RouteT.hs view
@@ -15,6 +15,7 @@  import Control.Applicative (Applicative((<*>), pure), Alternative((<|>), empty)) import Control.Monad (MonadPlus(mzero, mplus))+import Control.Monad.Catch (MonadCatch(catch), MonadThrow(throwM)) import Control.Monad.Cont(MonadCont(callCC)) import Control.Monad.Error (MonadError(throwError, catchError)) import Control.Monad.Fix (MonadFix(mfix))@@ -34,6 +35,18 @@ class (Monad m) => MonadRoute m where     type URL m     askRouteFn :: m (URL m -> [(Text, Maybe Text)] -> Text)++instance MonadCatch m => MonadCatch (RouteT url m) where+    catch action handler =+        RouteT $ \ fn -> catch (action' fn) (\ e -> handler' e fn)+        where+          action' = unRouteT action+          handler' e = unRouteT (handler e)++instance MonadThrow m => MonadThrow (RouteT url m) where+    throwM = throwM'+        where+          throwM' e = RouteT $ \ _fn -> throwM e  -- | convert a 'RouteT' based route handler to a handler that can be used with the 'Site' type --
web-routes.cabal view
@@ -1,5 +1,5 @@ Name:             web-routes-Version:          0.27.8+Version:          0.27.9 License:          BSD3 License-File:     LICENSE Author:           jeremy@seereason.com@@ -25,13 +25,14 @@  Library         Build-Depends:    base          >= 4    && < 5,-                          blaze-builder >= 0.2  && < 0.4,+                          blaze-builder >= 0.2  && < 0.5,                           parsec        >= 2    && < 4,                           bytestring    >= 0.9  && < 0.11,                           http-types    >= 0.6  && < 0.9,                           mtl           >= 2.0  && < 2.3,                           text          >= 0.11 && < 1.3,-                          utf8-string   >= 0.3  && < 0.4+                          utf8-string   >= 0.3  && < 1.1,+                          exceptions    >= 0.6.1 && < 0.9         if impl(ghc >= 7.2)           Build-Depends:  ghc-prim, split         Exposed-Modules:  Web.Routes