packages feed

aeson-value-parser 0.19.1 → 0.19.2

raw patch · 2 files changed

+8/−1 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ AesonValueParser: mappedText :: [(Text, a)] -> String a

Files

aeson-value-parser.cabal view
@@ -1,5 +1,5 @@ name: aeson-value-parser-version: 0.19.1+version: 0.19.2 synopsis: API for parsing "aeson" JSON tree into Haskell types description:   A flexible parser DSL of JSON AST produced by the \"aeson\" library
library/AesonValueParser.hs view
@@ -22,6 +22,7 @@   -- * String parsers   String,   text,+  mappedText,   narrowedText,   matchedText,   attoparsedText,@@ -172,6 +173,12 @@ {-# INLINE text #-} text :: String Text text = String ask++{-# INLINE mappedText #-}+mappedText :: [(Text, a)] -> String a+mappedText mappingList = let+  !hashMap = HashMap.fromList mappingList+  in narrowedText (flip HashMap.lookup hashMap)  {-# INLINE narrowedText #-} narrowedText :: (Text -> Maybe a) -> String a