summaryrefslogtreecommitdiff
path: root/dhall/tests
diff options
context:
space:
mode:
authorNadrieril2020-06-25 14:28:48 +0100
committerNadrieril2020-06-25 15:12:10 +0100
commitac7e39a752c41c06155e27e84404c67c1341065d (patch)
tree67b45b7efcf93abd3efa33b1d01fe4349ed3037b /dhall/tests
parent75929b8a3ca99ead6e10365439c40d2fe86dfe55 (diff)
spec!: remove Optional/build and Optional/fold
Diffstat (limited to 'dhall/tests')
-rw-r--r--dhall/tests/parser/success/builtinsB.txt2
-rw-r--r--dhall/tests/type-inference/failure/unit/LetWithNonterminatingAnnotation.txt12
-rw-r--r--dhall/tests/type-inference/failure/unit/RemovedBuiltinOptionalBuild.txt6
-rw-r--r--dhall/tests/type-inference/failure/unit/RemovedBuiltinOptionalFold.txt6
4 files changed, 25 insertions, 1 deletions
diff --git a/dhall/tests/parser/success/builtinsB.txt b/dhall/tests/parser/success/builtinsB.txt
index 4e3ed79..1005949 100644
--- a/dhall/tests/parser/success/builtinsB.txt
+++ b/dhall/tests/parser/success/builtinsB.txt
@@ -1 +1 @@
-λ(x : { field0 : Bool, field1 : Optional (Optional Bool), field2 : Natural, field3 : Integer, field4 : Double, field5 : Text, field6 : List (List Bool) }) → { field00 = Natural/fold, field01 = Natural/build, field02 = Natural/isZero, field03 = Natural/even, field04 = Natural/odd, field05 = Natural/toInteger, field06 = Natural/show, field07 = Integer/show, field08 = Double/show, field09 = List/build, field10 = List/fold, field11 = List/length, field12 = List/head, field13 = List/last, field14 = List/indexed, field15 = List/reverse, field16 = Optional/fold, field17 = Optional/build, field18 = True, field19 = False, field20 = None }
+[Natural/fold, Natural/build, Natural/isZero, Natural/even, Natural/odd, Natural/toInteger, Natural/show, Integer/toDouble, Integer/show, Integer/negate, Integer/clamp, Natural/subtract, Double/show, List/build, List/fold, List/length, List/head, List/last, List/indexed, List/reverse, Text/show, Bool, True, False, Optional, None, Natural, Integer, Double, Text, List, Type, Kind, Sort]
diff --git a/dhall/tests/type-inference/failure/unit/LetWithNonterminatingAnnotation.txt b/dhall/tests/type-inference/failure/unit/LetWithNonterminatingAnnotation.txt
new file mode 100644
index 0000000..6e360da
--- /dev/null
+++ b/dhall/tests/type-inference/failure/unit/LetWithNonterminatingAnnotation.txt
@@ -0,0 +1,12 @@
+Type error: error: expected function, found `Natural`
+ --> <current file>:6:25
+ |
+ 1 | -- When you check if an inferred type is equivalent to an annotation,
+ 2 | -- you must alpha-beta-normalize both sides first. But it is not safe
+ 3 | -- to beta-normalise an expression which hasn't first been
+ 4 | -- typechecked.
+...
+10 | let a
+11 | : (λ(x : Natural) → x x) (λ(x : Natural) → x x)
+ | ^ function application requires a function
+ |
diff --git a/dhall/tests/type-inference/failure/unit/RemovedBuiltinOptionalBuild.txt b/dhall/tests/type-inference/failure/unit/RemovedBuiltinOptionalBuild.txt
new file mode 100644
index 0000000..e4e285c
--- /dev/null
+++ b/dhall/tests/type-inference/failure/unit/RemovedBuiltinOptionalBuild.txt
@@ -0,0 +1,6 @@
+Type error: error: unbound variable ``Optional/build``
+ --> <current file>:1:1
+ |
+1 | Optional/build
+ | ^^^^^^^^^^^^^^ not found in this scope
+ |
diff --git a/dhall/tests/type-inference/failure/unit/RemovedBuiltinOptionalFold.txt b/dhall/tests/type-inference/failure/unit/RemovedBuiltinOptionalFold.txt
new file mode 100644
index 0000000..3d6c6aa
--- /dev/null
+++ b/dhall/tests/type-inference/failure/unit/RemovedBuiltinOptionalFold.txt
@@ -0,0 +1,6 @@
+Type error: error: unbound variable ``Optional/fold``
+ --> <current file>:1:1
+ |
+1 | Optional/fold
+ | ^^^^^^^^^^^^^ not found in this scope
+ |