packages feed

dhall-json 1.0.8 → 1.0.9

raw patch · 3 files changed

+17/−20 lines, 3 filesdep −neat-interpolationPVP ok

version bump matches the API change (PVP)

Dependencies removed: neat-interpolation

API changes (from Hackage documentation)

Files

dhall-json.cabal view
@@ -1,5 +1,5 @@ Name: dhall-json-Version: 1.0.8+Version: 1.0.9 Cabal-Version: >=1.8.0.2 Build-Type: Simple Tested-With: GHC == 7.10.2, GHC == 8.0.1@@ -29,11 +29,10 @@ Library     Hs-Source-Dirs: src     Build-Depends:-        base               >= 4.8.0.0  && < 5  ,-        aeson              >= 1.0.0.0  && < 1.3,-        dhall              >= 1.0.1    && < 1.9,-        neat-interpolation                < 0.4,-        text               >= 0.11.1.0 && < 1.3,+        base   >= 4.8.0.0  && < 5  ,+        aeson  >= 1.0.0.0  && < 1.3,+        dhall  >= 1.0.1    && < 1.9,+        text   >= 0.11.1.0 && < 1.3,         vector     Exposed-Modules: Dhall.JSON     GHC-Options: -Wall
dhall-to-json/Main.hs view
@@ -14,7 +14,7 @@ import qualified Control.Exception import qualified Data.Aeson import qualified Data.Aeson.Encode.Pretty-import qualified Data.ByteString.Lazy+import qualified Data.ByteString.Lazy.Char8 import qualified Data.Text.Lazy.IO import qualified Dhall import qualified Dhall.Import@@ -56,7 +56,7 @@                 if   Options.Generic.unHelpful pretty                 then Data.Aeson.Encode.Pretty.encodePretty                 else Data.Aeson.encode-        Data.ByteString.Lazy.putStr (encode json) ))+        Data.ByteString.Lazy.Char8.putStrLn (encode json) ))  handle :: IO a -> IO a handle = Control.Exception.handle handler
src/Dhall/JSON.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE QuasiQuotes        #-}  {-| This library only exports a single `dhallToJSON` function for translating a     Dhall syntax tree to a JSON syntax tree (i.e. a `Value`) for the @aeson@@@ -107,6 +106,7 @@  import Control.Exception (Exception) import Data.Aeson (Value)+import Data.Monoid ((<>)) import Data.Typeable (Typeable) import Dhall.Core (Expr) import Dhall.TypeCheck (X)@@ -117,7 +117,6 @@ import qualified Data.Text.Lazy.Builder import qualified Data.Vector import qualified Dhall.Core-import qualified NeatInterpolation  {-| This is the exception type for errors that might arise when translating     Dhall to JSON@@ -129,16 +128,15 @@  instance Show CompileError where     show (Unsupported e) =-        Data.Text.unpack [NeatInterpolation.text|-$_ERROR: Cannot translate to JSON--Explanation: Only primitive values, records, unions, ❰List❱s, and ❰Optional❱-values can be translated from Dhall to JSON--The following Dhall expression could not be translated to JSON:--↳ $txt-|]+        Data.Text.unpack $+            "" <> _ERROR <> ": Cannot translate to JSON                                     \n\+            \                                                                               \n\+            \Explanation: Only primitive values, records, unions, ❰List❱s, and ❰Optional❱   \n\+            \values can be translated from Dhall to JSON                                    \n\+            \                                                                               \n\+            \The following Dhall expression could not be translated to JSON:                \n\+            \                                                                               \n\+            \↳ " <> txt <> "                                                                "       where         txt = Data.Text.Lazy.toStrict (Dhall.Core.pretty e)