packages feed

dhall-json 1.2.4 → 1.2.5

raw patch · 4 files changed

+50/−32 lines, 4 filesdep ~dhalldep ~tastydep ~yamlPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: dhall, tasty, yaml

API changes (from Hackage documentation)

- Dhall.JSON: instance GHC.Exception.Exception Dhall.JSON.CompileError
+ Dhall.JSON: instance GHC.Exception.Type.Exception Dhall.JSON.CompileError
- Dhall.JSON: Unsupported :: (Expr X X) -> CompileError
+ Dhall.JSON: Unsupported :: Expr X X -> CompileError

Files

CHANGELOG.md view
@@ -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`
LICENSE view
@@ -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.
dhall-json.cabal view
@@ -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 @@ 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 @@     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 @@         dhall                                  ,         dhall-json                             ,         optparse-applicative                   ,-        yaml                 >= 0.5.0 && < 0.11,+        yaml                 >= 0.5.0 && < 0.12,         vector                                 ,         text     GHC-Options: -Wall
src/Dhall/JSON.hs view
@@ -239,7 +239,10 @@         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 @@             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'