json-stream 0.4.1.0 → 0.4.1.1
raw patch · 4 files changed
+51/−5 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Data.JsonStream.Parser: infixl 6 .|
+ Data.JsonStream.Parser: infixr 7 .!
- Data.JsonStream.Parser: integer :: (Integral i, Bounded i) => Parser i
+ Data.JsonStream.Parser: integer :: forall i. (Integral i, Bounded i) => Parser i
Files
- Data/JsonStream/CLexType.hs +43/−0
- Data/JsonStream/Parser.hs +4/−4
- changelog.md +3/−0
- json-stream.cabal +1/−1
+ Data/JsonStream/CLexType.hs view
@@ -0,0 +1,43 @@+{-# LINE 1 "CLexType.hs" #-}+{-# LINE 1 "CLexType.hsc" #-}+{-# LINE 2 "CLexType.hs" #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LINE 2 "CLexType.hsc" #-}+module Data.JsonStream.CLexType where++import Foreign.C.Types+import Foreign++newtype LexResultType = LexResultType CInt deriving (Show, Eq, Storable)+++{-# LINE 10 "CLexType.hsc" #-}++resNumber :: LexResultType+resNumber = LexResultType 0+resString :: LexResultType+resString = LexResultType 1+resTrue :: LexResultType+resTrue = LexResultType 2+resFalse :: LexResultType+resFalse = LexResultType 3+resNull :: LexResultType+resNull = LexResultType 4+resOpenBrace :: LexResultType+resOpenBrace = LexResultType 5+resCloseBrace :: LexResultType+resCloseBrace = LexResultType 6+resOpenBracket :: LexResultType+resOpenBracket = LexResultType 7+resCloseBracket :: LexResultType+resCloseBracket = LexResultType 8+resStringPartial :: LexResultType+resStringPartial = LexResultType 9+resStringUni :: LexResultType+resStringUni = LexResultType 11+resNumberPartial :: LexResultType+resNumberPartial = LexResultType 10+resNumberSmall :: LexResultType+resNumberSmall = LexResultType 12++{-# LINE 28 "CLexType.hsc" #-}
Data/JsonStream/Parser.hs view
@@ -237,11 +237,11 @@ (TokFailed) -> Failed "Array - token failed" where nextitem _ _ (ArrayEnd ctx) ntok = Done ctx ntok- nextitem i tok _ _ = arrcontent i (callParse (valparse i) tok)+ nextitem !i tok _ _ = arrcontent i (callParse (valparse i) tok) - arrcontent i (Done _ ntp) = moreData (nextitem (i+1)) ntp- arrcontent i (MoreData (Parser np, ntp)) = MoreData (Parser (arrcontent i . np), ntp)- arrcontent i (Yield v np) = Yield v (arrcontent i np)+ arrcontent !i (Done _ ntp) = moreData (nextitem (i+1)) ntp+ arrcontent !i (MoreData (Parser np, ntp)) = MoreData (Parser (arrcontent i . np), ntp)+ arrcontent !i (Yield v np) = Yield v (arrcontent i np) arrcontent _ (Failed err) = Failed err -- | Match all items of an array.
changelog.md view
@@ -1,3 +1,6 @@+# 0.4.1.1+Fixed memory leak in arrayOf+ # 0.4.1.0 Added aeson-compatibile encode/decode functions.
json-stream.cabal view
@@ -1,5 +1,5 @@ name: json-stream-version: 0.4.1.0+version: 0.4.1.1 synopsis: Incremental applicative JSON parser description: Easy to use JSON parser fully supporting incremental parsing. Parsing grammar in applicative form.