packages feed

dhall 1.40.0 → 1.40.1

raw patch · 4 files changed

+26/−1 lines, 4 filesdep ~aesondep ~hashabledep ~megaparsecPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: aeson, hashable, megaparsec, tasty-silver, template-haskell

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,11 @@+1.40.1++* [BUG FIX: Fix equivalence check for `Date` / `Time` / `TimeZone`](https://github.com/dhall-lang/dhall-haskell/pull/2291)+    * This fixes a serious bug in the recently introduced support for temporal+      literals where they would fail to type-check when given a correct type+      annotation or when they were checked against an existing type+    * For example, `00:00:00 : Time` was failing to type-check+ 1.40.0  * [Almost supports version 20.2.0 of the standard](https://github.com/dhall-lang/dhall-lang/releases/tag/v20.2.0)
dhall.cabal view
@@ -1,5 +1,5 @@ Name: dhall-Version: 1.40.0+Version: 1.40.1 Cabal-Version: 2.0 Build-Type: Simple License: BSD3
src/Dhall/Eval.hs view
@@ -981,6 +981,18 @@             conv env t t'         (VTextReplace a b c, VTextReplace a' b' c') ->             conv env a a' && conv env b b' && conv env c c'+        (VDate, VDate) ->+            True+        (VDateLiteral l, VDateLiteral r) ->+            l == r+        (VTime, VTime) ->+            True+        (VTimeLiteral tl pl, VTimeLiteral tr pr) ->+            tl == tr && pl == pr+        (VTimeZone, VTimeZone) ->+            True+        (VTimeZoneLiteral l, VTimeZoneLiteral r) ->+            l == r         (VList a, VList a') ->             conv env a a'         (VListLit _ xs, VListLit _ xs') ->
tests/Dhall/Test/TypeInference.hs view
@@ -97,6 +97,11 @@          Tasty.HUnit.assertEqual message resolvedExpectedType inferredType +        -- We also add this to exercise the `Dhall.Eval.conv` code path, since+        -- it's easy to forget to update it when adding new syntax+        _ <- Core.throws (TypeCheck.typeOf (Core.Annot resolvedExpr resolvedExpectedType))+        return ()+ failureTest :: Text -> TestTree failureTest prefix = do     let expectedFailures =