packages feed

web-routes-th 0.20.4 → 0.21.1

raw patch · 2 files changed

+9/−4 lines, 2 filesdep +textdep ~web-routesPVP ok

version bump matches the API change (PVP)

Dependencies added: text

Dependency ranges changed: web-routes

API changes (from Hackage documentation)

Files

Web/Routes/TH.hs view
@@ -4,6 +4,7 @@  import Control.Monad (ap, replicateM) import Data.List (intercalate)+import Data.Text (pack, unpack) import Language.Haskell.TH import Text.ParserCombinators.Parsec ((<|>),many1) import Web.Routes.PathInfo@@ -38,7 +39,7 @@                                   |  (conName, nArgs) <- cons ]                    toURLWork :: String -> [Name] -> ExpQ                    toURLWork conStr args-                       = foldr1 (\a b -> appE (appE [| (++) |] a) b) ([| [conStr] |] : [ [| toPathSegments $(varE arg) |] | arg <- args ])+                       = foldr1 (\a b -> appE (appE [| (++) |] a) b) ([| [pack conStr] |] : [ [| toPathSegments $(varE arg) |] | arg <- args ])                funD 'toPathSegments [clause [varP inp] (normalB body)  []]       fromPathSegmentsFn :: [(Name,Int)] -> DecQ       fromPathSegmentsFn cons@@ -47,7 +48,7 @@                             | (conName, nArgs) <- cons])                    parseCon :: Name -> Int -> ExpQ                    parseCon conName nArgs = foldl1 (\a b -> appE (appE [| ap |] a) b) -                                                   ([| segment $(stringE (nameBase conName)) >> return $(conE conName) |]+                                                   ([| segment (pack $(stringE (nameBase conName))) >> return $(conE conName) |]                                                    : (replicate nArgs [| fromPathSegments |]))                funD 'fromPathSegments [clause [] (normalB body) []] 
web-routes-th.cabal view
@@ -1,5 +1,5 @@ Name:             web-routes-th-Version:          0.20.4+Version:          0.21.1 License:          BSD3 License-File:     LICENSE Author:           jeremy@seereason.com@@ -11,7 +11,11 @@ Build-type:       Simple  Library-        Build-Depends:    base >= 4 && < 5, parsec >= 2 && < 4, template-haskell, web-routes >= 0.24.1+        Build-Depends:    base >= 4 && < 5,+                          parsec >= 2 && < 4,+                          template-haskell,+                          text,+                          web-routes >= 0.26         Exposed-Modules:  Web.Routes.TH  source-repository head