diff options
author | GabrielGonzalez <> | 2018-11-22 03:13:00 (GMT) |
---|---|---|
committer | hdiff <hdiff@hdiff.luite.com> | 2018-11-22 03:13:00 (GMT) |
commit | 0cdd7871f2f7f60e7204a04510d26b3d31bbea14 (patch) | |
tree | 9d048e2d2d44abe452b53bc5310ba79268a209a1 | |
parent | d9e28e12605e3f7b560f0db398dc670afb26d4b9 (diff) |
version 1.2.51.2.5
-rw-r--r-- | CHANGELOG.md | 7 | ||||
-rw-r--r-- | LICENSE | 45 | ||||
-rw-r--r-- | dhall-json.cabal | 10 | ||||
-rw-r--r-- | src/Dhall/JSON.hs | 20 |
4 files changed, 50 insertions, 32 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 12ca1e9..cf8ba6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +1.2.5 + +* Build against `dhall-1.19.0` + * See: https://github.com/dhall-lang/dhall-haskell/pull/667 + * See: https://github.com/dhall-lang/dhall-haskell/pull/675 + * See: https://github.com/dhall-lang/dhall-haskell/pull/689 + 1.2.4 * Build against `dhall-1.18.0` @@ -1,24 +1,27 @@ -Copyright (c) 2017 Gabriel Gonzalez +Copyright (c) 2018 Gabriel Gonzalez All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Gabriel Gonzalez nor the names of other contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the author nor the names of its contributors may be +used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/dhall-json.cabal b/dhall-json.cabal index 7d642ad..f3bb1d7 100644 --- a/dhall-json.cabal +++ b/dhall-json.cabal @@ -1,5 +1,5 @@ Name: dhall-json -Version: 1.2.4 +Version: 1.2.5 Cabal-Version: >=1.8.0.2 Build-Type: Simple Tested-With: GHC == 7.10.2, GHC == 8.0.1 @@ -8,7 +8,7 @@ License-File: LICENSE Copyright: 2017 Gabriel Gonzalez Author: Gabriel Gonzalez Maintainer: Gabriel439@gmail.com -Bug-Reports: https://github.com/dhall-lang/dhall-json/issues +Bug-Reports: https://github.com/dhall-lang/dhall-haskell/issues Synopsis: Compile Dhall to JSON or YAML Description: Use this package if you want to compile Dhall expressions to JSON or YAML. @@ -28,14 +28,14 @@ Extra-Source-Files: tasty/data/*.json Source-Repository head Type: git - Location: https://github.com/dhall-lang/dhall-json + Location: https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-json Library Hs-Source-Dirs: src Build-Depends: base >= 4.8.0.0 && < 5 , aeson >= 1.0.0.0 && < 1.5 , - dhall >= 1.18.0 && < 1.19, + dhall >= 1.19.0 && < 1.20, optparse-applicative >= 0.14.0.0 && < 0.15, text >= 0.11.1.0 && < 1.3 , unordered-containers < 0.3 @@ -65,7 +65,7 @@ Executable dhall-to-yaml dhall , dhall-json , optparse-applicative , - yaml >= 0.5.0 && < 0.11, + yaml >= 0.5.0 && < 0.12, vector , text GHC-Options: -Wall diff --git a/src/Dhall/JSON.hs b/src/Dhall/JSON.hs index cc5c487..8400c17 100644 --- a/src/Dhall/JSON.hs +++ b/src/Dhall/JSON.hs @@ -239,7 +239,10 @@ dhallToJSON e0 = loop (Dhall.Core.normalize e0) Dhall.Core.BoolLit a -> return (toJSON a) Dhall.Core.NaturalLit a -> return (toJSON a) Dhall.Core.IntegerLit a -> return (toJSON a) - Dhall.Core.DoubleLit a -> return (toJSON a) + Dhall.Core.DoubleLit a + | isInfinite a && a > 0 -> return (toJSON ( 1.7976931348623157e308 :: Double)) + | isInfinite a && a < 0 -> return (toJSON (-1.7976931348623157e308 :: Double)) + | otherwise -> return (toJSON a) Dhall.Core.TextLit (Dhall.Core.Chunks [] a) -> do return (toJSON a) Dhall.Core.ListLit _ a -> do @@ -386,12 +389,17 @@ convertToHomogeneousMaps (Conversion {..}) e0 = loop (Dhall.Core.normalize e0) a' = loop a b' = loop b - Dhall.Core.Let a b c d -> - Dhall.Core.Let a b' c' d' + Dhall.Core.Let as b -> + Dhall.Core.Let as' b' where - b' = fmap loop b - c' = loop c - d' = loop d + f (Dhall.Core.Binding x y z) = Dhall.Core.Binding x y' z' + where + y' = fmap loop y + z' = loop z + + as' = fmap f as + + b' = loop b Dhall.Core.Annot a b -> Dhall.Core.Annot a' b' |