packages feed

aeson-value-parser 0.19.7 → 0.19.7.1

raw patch · 3 files changed

+77/−39 lines, 3 filesdep ~vectorPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: vector

API changes (from Hackage documentation)

Files

aeson-value-parser.cabal view
@@ -1,47 +1,85 @@-name: aeson-value-parser-version: 0.19.7-synopsis: API for parsing "aeson" JSON tree into Haskell types+cabal-version: 3.0+name:          aeson-value-parser+version:       0.19.7.1+synopsis:      API for parsing "aeson" JSON tree into Haskell types description:   A flexible parser DSL of JSON AST produced by the \"aeson\" library   with automated and highly detailed error reporting.   Provides a featureful toolkit for parsing real-world documents with schemas   of any complexity or ambiguity, which the "FromJSON" instances   are simply not fit for.-category: Data, JSON, Parsing-homepage: https://github.com/sannsyn/aeson-value-parser-bug-reports: https://github.com/sannsyn/aeson-value-parser/issues-author: Nikita Volkov <nikita.y.volkov@mail.ru>-maintainer: Nikita Volkov <nikita.y.volkov@mail.ru>-copyright: (c) 2015, Sannsyn AS-license: MIT-license-file: LICENSE-build-type: Simple-cabal-version: >=1.10 +category:      Data, JSON, Parsing+homepage:      https://github.com/sannsyn/aeson-value-parser+bug-reports:   https://github.com/sannsyn/aeson-value-parser/issues+author:        Nikita Volkov <nikita.y.volkov@mail.ru>+maintainer:    Nikita Volkov <nikita.y.volkov@mail.ru>+copyright:     (c) 2015, Sannsyn AS+license:       MIT+license-file:  LICENSE+ source-repository head-  type: git+  type:     git   location: git://github.com/sannsyn/aeson-value-parser.git  library-  hs-source-dirs: library-  default-extensions: Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, PatternSynonyms, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples-  default-language: Haskell2010-  exposed-modules:-    AesonValueParser+  hs-source-dirs:     library+  default-extensions:+    NoImplicitPrelude+    NoMonomorphismRestriction+    Arrows+    BangPatterns+    ConstraintKinds+    DataKinds+    DefaultSignatures+    DeriveDataTypeable+    DeriveFoldable+    DeriveFunctor+    DeriveGeneric+    DeriveTraversable+    EmptyDataDecls+    FlexibleContexts+    FlexibleInstances+    FunctionalDependencies+    GADTs+    GeneralizedNewtypeDeriving+    LambdaCase+    LiberalTypeSynonyms+    MagicHash+    MultiParamTypeClasses+    MultiWayIf+    OverloadedStrings+    ParallelListComp+    PatternGuards+    PatternSynonyms+    QuasiQuotes+    RankNTypes+    RecordWildCards+    ScopedTypeVariables+    StandaloneDeriving+    TemplateHaskell+    TupleSections+    TypeFamilies+    TypeOperators+    UnboxedTuples++  default-language:   Haskell2010+  exposed-modules:    AesonValueParser   other-modules:     AesonValueParser.Error     AesonValueParser.Prelude     AesonValueParser.Vector+   build-depends:-    aeson >=2.0.2 && <3,-    attoparsec >=0.14 && <0.15,-    base >=4.12 && <5,-    bytestring >=0.10 && <0.12,-    hashable >=1.3 && <2,-    megaparsec >=8 && <10,-    mtl >=2.2 && <3,-    scientific ==0.3.*,-    text >=1 && <3,-    transformers >=0.5 && <0.7,-    unordered-containers ==0.2.*,-    vector >=0.10 && <0.13+    , aeson >=2.0.2 && <3+    , attoparsec >=0.14 && <0.15+    , base >=4.12 && <5+    , bytestring >=0.10 && <0.12+    , hashable >=1.3 && <2+    , megaparsec >=8 && <10+    , mtl >=2.2 && <3+    , scientific >=0.3 && <0.4+    , text >=1 && <3+    , transformers >=0.5 && <0.7+    , unordered-containers >=0.2 && <0.3+    , vector >=0.10 && <0.14
library/AesonValueParser.hs view
@@ -114,15 +114,15 @@  -- | Convert into a function directly applicable as definition -- of 'Aeson.parseJSON'.--- +-- -- Here's an example of how it can be used:--- +-- -- @ -- data Artist = Artist --   { artistName :: Text, --     artistGenres :: [Text] --   }--- +-- -- instance 'Aeson.FromJSON' Artist where --   'Aeson.parseJSON' = 'runAsValueParser' $ --     'object' $ do@@ -175,7 +175,7 @@     x -> fmap Just (runReaderT parser x)  {-# INLINE nullableMonoid #-}-nullableMonoid :: Monoid a => Value a -> Value a+nullableMonoid :: (Monoid a) => Value a -> Value a nullableMonoid (Value parser) = Value $   ReaderT $ \case     Aeson.Null -> pure mempty@@ -203,7 +203,7 @@     _ -> empty  {-# INLINE fromJSON #-}-fromJSON :: Aeson.FromJSON a => Value a+fromJSON :: (Aeson.FromJSON a) => Value a fromJSON =   Value $     ReaderT $@@ -279,7 +279,7 @@       else throwError (Last (Just (fromString ("Number " <> show x <> " is not integer"))))  {-# INLINE floating #-}-floating :: RealFloat a => Number a+floating :: (RealFloat a) => Number a floating = Number $   ReaderT $ \a -> case Scientific.toBoundedRealFloat a of     Right b -> return b@@ -298,7 +298,7 @@   Number parser -> parser >>= either (throwError . Last . Just) return . matcher  {-# INLINE matchedFloating #-}-matchedFloating :: RealFloat floating => (floating -> Either Text a) -> Number a+matchedFloating :: (RealFloat floating) => (floating -> Either Text a) -> Number a matchedFloating matcher = Number $ case floating of   Number parser -> parser >>= either (throwError . Last . Just) return . matcher 
library/AesonValueParser/Prelude.hs view
@@ -83,5 +83,5 @@ import Unsafe.Coerce as Exports import Prelude as Exports hiding (all, and, any, concat, concatMap, elem, fail, foldl, foldl1, foldr, foldr1, id, mapM, mapM_, maximum, minimum, notElem, or, product, sequence, sequence_, sum, (.)) -showText :: Show a => a -> Text+showText :: (Show a) => a -> Text showText = fromString . show