summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabrielGonzalez <>2018-04-28 15:11:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-04-28 15:11:00 (GMT)
commitfb2be9465e7579b709852e4bc28975510dcc0791 (patch)
tree4420c7ccb081f2170db58310078bef10d36fba80
parent9bf5c087e0c3dc1586d391ad6d97199bcabd7e61 (diff)
version 1.1.01.1.0
-rw-r--r--dhall-json.cabal6
-rw-r--r--src/Dhall/JSON.hs12
2 files changed, 7 insertions, 11 deletions
diff --git a/dhall-json.cabal b/dhall-json.cabal
index c7fcece..f23375e 100644
--- a/dhall-json.cabal
+++ b/dhall-json.cabal
@@ -1,5 +1,5 @@
Name: dhall-json
-Version: 1.0.13
+Version: 1.1.0
Cabal-Version: >=1.8.0.2
Build-Type: Simple
Tested-With: GHC == 7.10.2, GHC == 8.0.1
@@ -30,11 +30,9 @@ Library
Hs-Source-Dirs: src
Build-Depends:
base >= 4.8.0.0 && < 5 ,
- bytestring < 0.11,
aeson >= 1.0.0.0 && < 1.4 ,
- dhall >= 1.11.0 && < 1.13,
+ dhall >= 1.11.0 && < 1.14,
text >= 0.11.1.0 && < 1.3 ,
- trifecta >= 1.6 && < 1.8 ,
unordered-containers < 0.3
Exposed-Modules: Dhall.JSON
GHC-Options: -Wall
diff --git a/src/Dhall/JSON.hs b/src/Dhall/JSON.hs
index c944285..196dfd7 100644
--- a/src/Dhall/JSON.hs
+++ b/src/Dhall/JSON.hs
@@ -108,12 +108,10 @@ module Dhall.JSON (
import Control.Exception (Exception, throwIO)
import Data.Aeson (Value(..))
-import Data.ByteString
import Data.Monoid ((<>))
import Data.Typeable (Typeable)
import Dhall.Core (Expr)
import Dhall.TypeCheck (X)
-import Text.Trifecta.Delta (Delta(..))
import qualified Data.Aeson
import qualified Data.HashMap.Strict
@@ -207,13 +205,13 @@ omitNull Null =
>>> Object (fromList [("a",Number 1.0)])
-}
codeToValue
- :: Data.ByteString.ByteString -- ^ Describe the input for the sake of error location.
- -> Data.Text.Text -- ^ Input text.
+ :: Data.Text.Text -- ^ Describe the input for the sake of error location.
+ -> Data.Text.Text -- ^ Input text.
-> IO Value
codeToValue name code = do
- expr <- case Dhall.Parser.exprFromText (Directed name 0 0 0 0) $ Data.Text.Lazy.fromStrict code of
- Left err -> Control.Exception.throwIO err
- Right expr -> return expr
+ expr <- case Dhall.Parser.exprFromText (Data.Text.unpack name) (Data.Text.Lazy.fromStrict code) of
+ Left err -> Control.Exception.throwIO err
+ Right expr -> return expr
expr' <- Dhall.Import.load expr
case Dhall.TypeCheck.typeOf expr' of