path-pieces 0.1.5 → 0.2.0
raw patch · 3 files changed
+8/−12 lines, 3 files
Files
- ChangeLog.md +4/−0
- Web/PathPieces.hs +3/−11
- path-pieces.cabal +1/−1
ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.2.0++* Make `PathMultiPiece` instance for lists based on `PathPiece` [Yesod issue #932](https://github.com/yesodweb/yesod/issues/932)+ ## 0.1.5 Added more integral instances, and check bounds on them [#5](https://github.com/yesodweb/path-pieces/pull/5).
Web/PathPieces.hs view
@@ -118,17 +118,9 @@ fromPathMultiPiece :: [S.Text] -> Maybe s toPathMultiPiece :: s -> [S.Text] -instance PathMultiPiece [String] where- fromPathMultiPiece = Just . map S.unpack- toPathMultiPiece = map S.pack--instance PathMultiPiece [S.Text] where- fromPathMultiPiece = Just- toPathMultiPiece = id--instance PathMultiPiece [L.Text] where- fromPathMultiPiece = Just . map (L.fromChunks . return)- toPathMultiPiece = map $ S.concat . L.toChunks+instance PathPiece a => PathMultiPiece [a] where+ fromPathMultiPiece = mapM fromPathPiece+ toPathMultiPiece = map toPathPiece {-# DEPRECATED toSinglePiece "Use toPathPiece instead of toSinglePiece" #-} toSinglePiece :: PathPiece p => p -> S.Text
path-pieces.cabal view
@@ -1,5 +1,5 @@ name: path-pieces-version: 0.1.5+version: 0.2.0 license: BSD3 license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>