unjson 0.15.2.0 → 0.15.2.1
raw patch · 3 files changed
+25/−18 lines, 3 filesdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
- Data.Unjson: instance (Data.Typeable.Internal.Typeable a, GHC.Show.Show a) => GHC.Exception.Exception (Data.Unjson.Anchored a)
- Data.Unjson: instance Data.Semigroup.Semigroup Data.Unjson.Path
- Data.Unjson: instance Data.Unjson.Unjson a => Data.Unjson.Unjson (Data.Monoid.Dual a)
+ Data.Unjson: instance (Data.Typeable.Internal.Typeable a, GHC.Show.Show a) => GHC.Exception.Type.Exception (Data.Unjson.Anchored a)
+ Data.Unjson: instance Data.Unjson.Unjson a => Data.Unjson.Unjson (Data.Semigroup.Internal.Dual a)
+ Data.Unjson: instance GHC.Base.Semigroup Data.Unjson.Path
- Data.Unjson: enumOf :: (Eq k) => Text -> [(Text, k)] -> UnjsonDef k
+ Data.Unjson: enumOf :: Eq k => Text -> [(Text, k)] -> UnjsonDef k
- Data.Unjson: renderDocForPath :: (Monad m) => Path -> UnjsonDef a -> m Doc
+ Data.Unjson: renderDocForPath :: Monad m => Path -> UnjsonDef a -> m Doc
- Data.Unjson: unjsonIsConstrByName :: (Data a) => String -> a -> Bool
+ Data.Unjson: unjsonIsConstrByName :: Data a => String -> a -> Bool
Files
- CHANGELOG.md +8/−1
- src/Data/Unjson.hs +11/−11
- unjson.cabal +6/−6
CHANGELOG.md view
@@ -1,5 +1,12 @@+# unjson-0.15.2.1 (2018-11-19)+* GHC 8.6 support ([#12](https://github.com/scrive/unjson/pull/12)).+* Documentation fixes+ ([#11](https://github.com/scrive/unjson/issues/11),+ [#13](https://github.com/scrive/unjson/issues/13),+ [#14](https://github.com/scrive/unjson/issues/14)).+ # unjson-0.15.2.0 (2018-03-18)-* GHC 8.4.1 support.+* GHC 8.4 support. # unjson-0.15.1.0 (2018-03-05) * -Wall police.
src/Data/Unjson.hs view
@@ -38,7 +38,7 @@ -- > <*> fieldDefBy "array_of_ints" [] -- > exampleArray -- > "Array of integers, optional, defaults to empty list"--- > arrayOf+-- > (arrayOf unjsonDef) -- > <*> fieldOpt "optional_bool" -- > exampleOptional -- > "Optional boolean"@@ -61,10 +61,10 @@ -- -- Parsing: ----- > let Result val iss = parse unjsonExample (Anchored mempty $--- > object [ "name" .= 123,--- > "array_of_ints" .= [toJSON 123, toJSON "abc"],--- > "optional_bool" .= True ])+-- > let Result val iss = parse unjsonExample $+-- > object [ "name" .= 123+-- > , "array_of_ints" .= [toJSON 123, toJSON "abc"]+-- > , "optional_bool" .= True ] -- -- Error reporting: --@@ -173,7 +173,7 @@ import Data.Typeable import Data.Data import Data.Maybe-import Data.Monoid+import Data.Monoid hiding (Ap) import Data.Primitive.Types import Data.Hashable import Data.Scientific@@ -924,7 +924,7 @@ -- Example: -- -- > let json = Aeson.object [ ... ]--- > let Result val iss = parse unjsonThing (Anchored [] json)+-- > let Result val iss = parse unjsonThing json -- > if null iss -- > then putStrLn ("Parsed: " ++ show val) -- > else putStrLn ("Not parsed, issues: " ++ show iss)@@ -1197,8 +1197,8 @@ -- > ("b_thing", unjsonIsConstrByName "B", -- > pure B <*> field "string" "An int value")] ----- Note that each case in list must be able to discriminate between--- constructors in a data type and ti has to be able to this both+-- Note that each case in the list must be able to discriminate between+-- constructors in a data type and it has to be able to this both -- ways: to find out based on json contents which constructor applies -- and also based on data contructor which of serialization cases to -- use.@@ -1226,8 +1226,8 @@ -- > (unjsonIsConstrByName "B", -- > pure B <*> field "int" "An int value")] ----- Note that each case in list must be able to discriminate between--- constructors in a data type and ti has to be able to this both+-- Note that each case in the list must be able to discriminate between+-- constructors in a data type and it has to be able to this both -- ways: to find out based on json contents which constructor applies -- and also based on data contructor which of serialization cases to -- use. To know what constructor to use at parsing time unjson looks
unjson.cabal view
@@ -1,5 +1,6 @@+cabal-version: 1.18 name: unjson-version: 0.15.2.0+version: 0.15.2.1 synopsis: Bidirectional JSON parsing and generation. description: Bidirectional JSON parsing and generation with automatic documentation support.@@ -14,9 +15,8 @@ category: Data build-type: Simple extra-source-files: README.md, CHANGELOG.md-cabal-version: >=1.18 tested-with: GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2,- GHC == 8.2.2, GHC == 8.4.1+ GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.2 source-repository head type: git@@ -25,14 +25,14 @@ source-repository this type: git location: https://github.com/scrive/unjson.git- tag: 0.15.2.0+ tag: 0.15.2.1 library exposed-modules: Data.Unjson -- other-modules: -- other-extensions:- build-depends: base >= 4.7 && < 5,- aeson >= 1.0 && < 1.4,+ build-depends: base >= 4.7 && < 4.13,+ aeson >= 1.0 && < 1.5, attoparsec, bytestring >= 0.10, containers,