dhall-json 1.0.13 → 1.1.0
raw patch · 2 files changed
+7/−11 lines, 2 filesdep −trifectadep ~dhallPVP ok
version bump matches the API change (PVP)
Dependencies removed: trifecta
Dependency ranges changed: dhall
API changes (from Hackage documentation)
- Dhall.JSON: codeToValue :: ByteString -> Text -> IO Value
+ Dhall.JSON: codeToValue :: Text -> Text -> IO Value
Files
- dhall-json.cabal +2/−4
- src/Dhall/JSON.hs +5/−7
dhall-json.cabal view
@@ -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 @@ 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
src/Dhall/JSON.hs view
@@ -108,12 +108,10 @@ 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 @@ >>> 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