packages feed

wai-routes 0.3.2 → 0.3.3

raw patch · 4 files changed

+59/−16 lines, 4 files

Files

README.md view
@@ -1,4 +1,4 @@-Wai Routes (wai-routes-0.3.2)+Wai Routes (wai-routes-0.3.3) ==============================  [![Build Status](https://travis-ci.org/ajnsit/wai-routes.png)](https://travis-ci.org/ajnsit/wai-routes)@@ -69,13 +69,14 @@ Changelog ========= -0.1   : Intial release-0.2   : Updated functionality based on yesod-routes package-0.2.1 : Changed license to MIT-0.2.2 : Fixed license information in hs and cabal files-0.2.3 : Implemented a better showRoute function. Added blaze-builder as a dependency-0.2.4 : Put an upper bound on yesod-routes version as 1.2 breaks API compatibility-0.3.0 : yesod-routes 1.2 compatibility. Abstracted request data. Created `runNext` which skips to the next app in the wai stack-0.3.1 : Removed internal 'App' synonym which only muddied the types. Added common content types for convenience.-0.3.2 : Added HandlerM Monad which makes it easier to build Handlers+* 0.1   : Intial release+* 0.2   : Updated functionality based on yesod-routes package+* 0.2.1 : Changed license to MIT+* 0.2.2 : Fixed license information in hs and cabal files+* 0.2.3 : Implemented a better showRoute function. Added blaze-builder as a dependency+* 0.2.4 : Put an upper bound on yesod-routes version as 1.2 breaks API compatibility+* 0.3.0 : yesod-routes 1.2 compatibility. Abstracted request data. Created `runNext` which skips to the next app in the wai stack+* 0.3.1 : Removed internal 'App' synonym which only muddied the types. Added common content types for convenience.+* 0.3.2 : Added HandlerM Monad which makes it easier to build Handlers+* 0.3.3 : Better exports from the Network.Wai.Middleware.Routes module 
examples/Example.hs view
@@ -3,7 +3,6 @@  import Network.Wai import Network.Wai.Middleware.Routes-import Network.Wai.Middleware.Routes.Handler import Network.Wai.Middleware.Routes.ContentTypes import Network.Wai.Application.Static import Network.Wai.Handler.Warp
src/Network/Wai/Middleware/Routes.hs view
@@ -10,11 +10,54 @@ This package provides typesafe URLs for Wai applications. -} module Network.Wai.Middleware.Routes-  ( module Network.Wai.Middleware.Routes.Routes-  , module Network.Wai.Middleware.Routes.Monad+    ( -- * Quasi Quoters+      parseRoutes            -- | Parse Routes declared inline+    , parseRoutesFile        -- | Parse routes declared in a file+    , parseRoutesNoCheck     -- | Parse routes declared inline, without checking for overlaps+    , parseRoutesFileNoCheck -- | Parse routes declared in a file, without checking for overlaps++    -- * Template Haskell methods+    , mkRoute++    -- * Dispatch+    , routeDispatch++    -- * URL rendering and parsing+    , showRoute+    , readRoute++    -- * Application Handlers+    , Handler++    -- * Generated Datatypes+    , Routable(..)           -- | Used internally. However needs to be exported for TH to work.+    , RenderRoute(..)        -- | A `RenderRoute` instance for your site datatype is automatically generated by `mkRoute`+    , ParseRoute(..)         -- | A `ParseRoute` instance for your site datatype is automatically generated by `mkRoute`+    , RouteAttrs(..)         -- | A `RouteAttrs` instance for your site datatype is automatically generated by `mkRoute`++    -- * Accessing Raw Request Data+    , RequestData            -- | An abstract representation of the request data. You can get the wai request object by using `waiReq`+    , waiReq                 -- | Extract the wai `Request` object from `RequestData`+    , nextApp                -- | Extract the next Application in the stack+    , runNext                -- | Run the next application in the stack++    -- * Route Monad makes it easy to compose routes together+    , RouteM+    , defaultAction          -- | Set the default action for a app+    , middleware             -- | Add another middleware to the app+    , route                  -- | Add another routed middleware to the app+    , toWaiApp               -- | Convert a RouteM to a wai Application++    -- * HandlerM Monad makes it easy to build a handler+    , HandlerM()+    , runHandlerM            -- | Run a HandlerM to get a Handler+    , request                -- | Access the request data+    , master                 -- | Access the master datatype+    , next                   -- | Run the next application in the stack   )   where  import Network.Wai.Middleware.Routes.Routes import Network.Wai.Middleware.Routes.Monad+import Network.Wai.Middleware.Routes.Handler 
wai-routes.cabal view
@@ -1,5 +1,5 @@ Name:                wai-routes-Version:             0.3.2+Version:             0.3.3 Synopsis:            Typesafe URLs for Wai applications. Homepage:            https://github.com/ajnsit/wai-routes License:             MIT@@ -63,8 +63,8 @@  source-repository this   type:     git-  location: http://github.com/ajnsit/wai-routes/tree/v0.3.1-  tag:      v0.3.1+  location: http://github.com/ajnsit/wai-routes/tree/v0.3.3+  tag:      v0.3.3  Library   hs-source-dirs:    src