packages feed

dhall-json 1.0.11 → 1.0.12

raw patch · 2 files changed

+9/−14 lines, 2 filesdep −vectordep ~aesondep ~dhallPVP ok

version bump matches the API change (PVP)

Dependencies removed: vector

Dependency ranges changed: aeson, dhall

API changes (from Hackage documentation)

Files

dhall-json.cabal view
@@ -1,5 +1,5 @@ Name: dhall-json-Version: 1.0.11+Version: 1.0.12 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/Gabriel439/Haskell-Dhall-JSON-Library/issues+Bug-Reports: https://github.com/dhall-lang/dhall-json/issues Synopsis: Compile Dhall to JSON or YAML Description:     Use this package if you want to compile Dhall expressions to JSON or YAML.@@ -24,16 +24,15 @@ Category: Compiler Source-Repository head     Type: git-    Location: https://github.com/Gabriel439/Haskell-Dhall-JSON-Library+    Location: https://github.com/dhall-lang/dhall-json  Library     Hs-Source-Dirs: src     Build-Depends:         base   >= 4.8.0.0  && < 5   ,-        aeson  >= 1.0.0.0  && < 1.3 ,-        dhall  >= 1.9.0    && < 1.11,-        text   >= 0.11.1.0 && < 1.3 ,-        vector+        aeson  >= 1.0.0.0  && < 1.4 ,+        dhall  >= 1.11.0   && < 1.12,+        text   >= 0.11.1.0 && < 1.3     Exposed-Modules: Dhall.JSON     GHC-Options: -Wall 
src/Dhall/JSON.hs view
@@ -115,7 +115,6 @@ import qualified Data.Text import qualified Data.Text.Lazy import qualified Data.Text.Lazy.Builder-import qualified Data.Vector import qualified Dhall.Core  {-| This is the exception type for errors that might arise when translating@@ -168,12 +167,9 @@         Dhall.Core.ListLit _ a -> do             a' <- traverse loop a             return (Data.Aeson.toJSON a')-        Dhall.Core.OptionalLit _ a ->-            if Data.Vector.null a-                then return (Data.Aeson.toJSON (Nothing :: Maybe ()))-                else do-                    b <- dhallToJSON (Data.Vector.head a)-                    return (Data.Aeson.toJSON (Just b))+        Dhall.Core.OptionalLit _ a -> do+            a' <- traverse loop a+            return (Data.Aeson.toJSON a')         Dhall.Core.RecordLit a -> do             a' <- traverse loop a             return (Data.Aeson.toJSON a')