Commit c3351ea
authored
This is fixing a bug where a temporal literal fails to type-check
when given a type annotation (or more generally, when the type-checker
checks it against an expected type).
For example, the expression `00:00:00 : Date` would not type-check.
The reason why is that `Dhall.Eval.conv` was missing cases for
the `Date` / `Time` / `TimeZone` types and their respective literals,
which this change fixes.
I also fixed the test suite to catch future issues like this. We do
have standard tests that check that temporal literals against
expected types, but we were running the tests in such a way that we
were not exercising the `Dhall.Eval.conv` code path that had this
bug.
So I updated the test suite so that it now catches this issue and
future issues like this. I verified that the updated test suite
now fails without this fix and passes with the fix.
1 parent 01e7048 commit c3351ea
2 files changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
981 | 981 | | |
982 | 982 | | |
983 | 983 | | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
984 | 996 | | |
985 | 997 | | |
986 | 998 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
| |||
0 commit comments