summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabrielGonzalez <>2019-01-06 03:24:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2019-01-06 03:24:00 (GMT)
commita04f2565597c4e7bc6e472928387033a9b232992 (patch)
treeaa7aa835b01b27e617a2a4741c69ec185e2d3f63
parentb6a0c589fa2828c6f6228f16a1958afb654c3600 (diff)
version 1.20.1HEAD1.20.1master
-rw-r--r--CHANGELOG.md9
-rw-r--r--Prelude/Monoid2
-rw-r--r--Prelude/package.dhall2
-rw-r--r--dhall.cabal2
-rw-r--r--src/Dhall/Binary.hs14
-rw-r--r--tests/import/success/fieldOrderA.dhall4
-rw-r--r--tests/import/success/issue553B.dhall2
7 files changed, 22 insertions, 13 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 21942bb..7e49eca 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+1.20.1
+
+* BUG FIX: Fix binary encoding to use correct standard version
+ * This fixes computed hashes to correctly match standard version 5.0.0
+ * This is not marked as a breaking change since it is a bug fix. The
+ 1.20.0 release will be blacklisted on Hackage and users should upgrade
+ from 1.19.* directly to 1.20.1
+ * See: https://github.com/dhall-lang/dhall-haskell/pull/771
+
1.20.0
* Supports version 5.0.0 of the language standard
diff --git a/Prelude/Monoid b/Prelude/Monoid
index be74413..32c57d8 100644
--- a/Prelude/Monoid
+++ b/Prelude/Monoid
@@ -1 +1 @@
-https://raw.githubusercontent.com/dhall-lang/Prelude/a22da69657b9316a3c51ba0bf80c9d4024db3fce/Monoid sha256:c4ff4f04ce9d3b7b579ff2ac7fe00258d665c701f895493b73082b750b28553d
+https://raw.githubusercontent.com/dhall-lang/Prelude/a22da69657b9316a3c51ba0bf80c9d4024db3fce/Monoid sha256:b306524b2f7fedd7dad0d328990e0b6271d93d6f2fbe7156474b757f5d8de187
diff --git a/Prelude/package.dhall b/Prelude/package.dhall
index ae29357..ea74220 100644
--- a/Prelude/package.dhall
+++ b/Prelude/package.dhall
@@ -1 +1 @@
-https://raw.githubusercontent.com/dhall-lang/Prelude/e9c90396c02f9eb0fe66c00c544615cbfa068f34/package.dhall sha256:534e4a9e687ba74bfac71b30fc27aa269c0465087ef79bf483e876781602a454
+https://raw.githubusercontent.com/dhall-lang/Prelude/e9c90396c02f9eb0fe66c00c544615cbfa068f34/package.dhall sha256:26e13b153cb428366610110d4d8f0c135e22b20179d5478bb16b1b83b3f2ca13
diff --git a/dhall.cabal b/dhall.cabal
index 1489d19..1493db9 100644
--- a/dhall.cabal
+++ b/dhall.cabal
@@ -1,5 +1,5 @@
Name: dhall
-Version: 1.20.0
+Version: 1.20.1
Cabal-Version: >=1.10
Build-Type: Simple
Tested-With: GHC == 8.0.1
diff --git a/src/Dhall/Binary.hs b/src/Dhall/Binary.hs
index 0c36185..a5dab33 100644
--- a/src/Dhall/Binary.hs
+++ b/src/Dhall/Binary.hs
@@ -62,11 +62,11 @@ import qualified Options.Applicative
-- | Supported version strings
data StandardVersion
- = V_4_0_0
- -- ^ Version "4.0.0"
+ = V_5_0_0
+ -- ^ Version "5.0.0"
defaultStandardVersion :: StandardVersion
-defaultStandardVersion = V_4_0_0
+defaultStandardVersion = V_5_0_0
parseStandardVersion :: Parser StandardVersion
parseStandardVersion =
@@ -80,7 +80,7 @@ parseStandardVersion =
readVersion = do
string <- Options.Applicative.str
case string :: Text of
- "4.0.0" -> return V_4_0_0
+ "5.0.0" -> return V_5_0_0
_ -> fail "Unsupported version"
{-| Convert a function applied to multiple arguments to the base function and
@@ -827,7 +827,7 @@ decodeWithVersion term = do
fail ("Cannot decode the version from this decoded CBOR expression: " <> show term)
case version of
- "4.0.0" -> do
+ "5.0.0" -> do
return ()
_ -> do
fail ("This decoded version is not supported: " <> Data.Text.unpack version)
@@ -840,8 +840,8 @@ decodeWithVersion term = do
-- | Encode a Dhall expression using the specified `Version`
encodeWithVersion :: StandardVersion -> Expr s Import -> Term
-encodeWithVersion V_4_0_0 expression =
- TList [ TString "4.0.0", encode expression ]
+encodeWithVersion V_5_0_0 expression =
+ TList [ TString "5.0.0", encode expression ]
data DecodingFailure
= CannotDecodeVersionString Term
diff --git a/tests/import/success/fieldOrderA.dhall b/tests/import/success/fieldOrderA.dhall
index 858268e..fe55dce 100644
--- a/tests/import/success/fieldOrderA.dhall
+++ b/tests/import/success/fieldOrderA.dhall
@@ -1,5 +1,5 @@
{ example0 =
- ../data/fieldOrder/1.dhall sha256:4a7866b88389e18cf481b525544fd7903325252faf3a86c8fdc981298c788a9b
+ ../data/fieldOrder/1.dhall sha256:261b3aca810973f81175d19b16226aaa5e76df7ea51c5d45e890dd6cdc49abbd
, example1 =
- ../data/fieldOrder/2.dhall sha256:4a7866b88389e18cf481b525544fd7903325252faf3a86c8fdc981298c788a9b
+ ../data/fieldOrder/2.dhall sha256:261b3aca810973f81175d19b16226aaa5e76df7ea51c5d45e890dd6cdc49abbd
}
diff --git a/tests/import/success/issue553B.dhall b/tests/import/success/issue553B.dhall
index eb8df7a..984fc57 100644
--- a/tests/import/success/issue553B.dhall
+++ b/tests/import/success/issue553B.dhall
@@ -1 +1 @@
-./issue553A.dhall sha256:e2d014696fb7d773727ae5aa42dc20bbd2447ea82bcb5971ccbb7763906edace
+./issue553A.dhall sha256:250873549ddd262f27f3b197b2a2631fb569e7bdfe12446fc0912b4a2359a83e