dhall-json 1.7.9 → 1.7.10
raw patch · 4 files changed
+34/−16 lines, 4 filesdep ~aesondep ~aeson-prettydep ~dhallPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: aeson, aeson-pretty, dhall
API changes (from Hackage documentation)
Files
- CHANGELOG.md +7/−0
- dhall-json.cabal +6/−6
- dhall-to-json/Main.hs +16/−10
- src/Dhall/JSON.hs +5/−0
CHANGELOG.md view
@@ -1,3 +1,10 @@+1.7.10++* [Don't use scientific notation for large integers](https://github.com/dhall-lang/dhall-haskell/pull/2352)+* Build against `dhall-1.41`+* [Build against `text-2.0`](https://github.com/dhall-lang/dhall-haskell/pull/2356)+* [Build against `optparse-applicative-0.17`](https://github.com/dhall-lang/dhall-haskell/pull/2376)+ 1.7.9 * [Build against `aeson-2.0`](https://github.com/dhall-lang/dhall-haskell/pull/2315)
dhall-json.cabal view
@@ -1,5 +1,5 @@ Name: dhall-json-Version: 1.7.9+Version: 1.7.10 Cabal-Version: >=1.10 Build-Type: Simple License: BSD3@@ -39,18 +39,18 @@ Build-Depends: base >= 4.11.0.0 && < 5 , aeson >= 1.4.6.0 && < 2.1 ,- aeson-pretty < 0.9 ,+ aeson-pretty >= 0.8.0 && < 0.9 , aeson-yaml >= 1.1.0 && < 1.2 , bytestring < 0.12, containers >= 0.5.9 && < 0.7 ,- dhall >= 1.40.0 && < 1.41,+ dhall >= 1.41.0 && < 1.42, exceptions >= 0.8.3 && < 0.11, filepath < 1.5 , lens-family-core >= 1.0.0 && < 2.2 ,- optparse-applicative >= 0.14.0.0 && < 0.17,+ optparse-applicative >= 0.14.0.0 && < 0.18, prettyprinter >= 1.7.0 && < 1.8 , scientific >= 0.3.0.0 && < 0.4 ,- text >= 0.11.1.0 && < 1.3 ,+ text >= 0.11.1.0 && < 2.1 , unordered-containers < 0.3 , vector Exposed-Modules:@@ -106,7 +106,7 @@ optparse-applicative , prettyprinter , prettyprinter-ansi-terminal >= 1.1.1 && < 1.2 ,- text < 1.3+ text Other-Modules: Paths_dhall_json GHC-Options: -Wall
dhall-to-json/Main.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeApplications #-} module Main where @@ -12,14 +13,15 @@ import qualified Control.Exception import qualified Data.Aeson-import qualified Data.Aeson.Encode.Pretty+import qualified Data.Aeson.Text+import qualified Data.Aeson.Encode.Pretty as Pretty import qualified Data.ByteString.Lazy-import qualified Data.Text.IO as Text.IO+import qualified Data.Text.IO as Text.IO import qualified Dhall import qualified Dhall.JSON import qualified GHC.IO.Encoding-import qualified Options.Applicative as Options-import qualified Paths_dhall_json as Meta+import qualified Options.Applicative as Options+import qualified Paths_dhall_json as Meta import qualified System.Exit import qualified System.IO @@ -123,14 +125,18 @@ Options {..} -> handle $ do- let config = Data.Aeson.Encode.Pretty.Config- { Data.Aeson.Encode.Pretty.confIndent = Data.Aeson.Encode.Pretty.Spaces 2- , Data.Aeson.Encode.Pretty.confCompare = compare- , Data.Aeson.Encode.Pretty.confNumFormat = Data.Aeson.Encode.Pretty.Generic- , Data.Aeson.Encode.Pretty.confTrailingNewline = False }+ let custom scientific =+ Data.Aeson.Text.encodeToTextBuilder (Data.Aeson.Number scientific)++ let config = Pretty.Config+ { Pretty.confIndent = Pretty.Spaces 2+ , Pretty.confCompare = compare+ , Pretty.confNumFormat = Pretty.Custom custom+ , Pretty.confTrailingNewline = False+ } let encode = if pretty- then Data.Aeson.Encode.Pretty.encodePretty' config+ then Pretty.encodePretty' config else Data.Aeson.encode let explaining = if explain then Dhall.detailed else id
src/Dhall/JSON.hs view
@@ -1045,6 +1045,11 @@ a' = loop a b' = fmap loop b + Core.ShowConstructor a ->+ Core.ShowConstructor a'+ where+ a' = loop a+ Core.Field a b -> Core.Field a' b where