summaryrefslogtreecommitdiff
path: root/dhall/tests/type-inference/failure/unit
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/tests/type-inference/failure/unit')
-rw-r--r--dhall/tests/type-inference/failure/unit/FunctionTypeOutputTypeNotAType.dhall1
-rw-r--r--dhall/tests/type-inference/failure/unit/FunctionTypeOutputTypeNotAType.txt7
-rw-r--r--dhall/tests/type-inference/failure/unit/LetInSort.dhall1
-rw-r--r--dhall/tests/type-inference/failure/unit/LetInSort.txt6
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeBool.dhall1
-rw-r--r--dhall/tests/type-inference/failure/unit/MergeBool.txt6
-rw-r--r--dhall/tests/type-inference/failure/unit/NestedAnnotInnerWrong.dhall1
-rw-r--r--dhall/tests/type-inference/failure/unit/NestedAnnotInnerWrong.txt6
-rw-r--r--dhall/tests/type-inference/failure/unit/NestedAnnotOuterWrong.dhall1
-rw-r--r--dhall/tests/type-inference/failure/unit/NestedAnnotOuterWrong.txt6
10 files changed, 36 insertions, 0 deletions
diff --git a/dhall/tests/type-inference/failure/unit/FunctionTypeOutputTypeNotAType.dhall b/dhall/tests/type-inference/failure/unit/FunctionTypeOutputTypeNotAType.dhall
new file mode 100644
index 0000000..94b32f9
--- /dev/null
+++ b/dhall/tests/type-inference/failure/unit/FunctionTypeOutputTypeNotAType.dhall
@@ -0,0 +1 @@
+Bool -> 1
diff --git a/dhall/tests/type-inference/failure/unit/FunctionTypeOutputTypeNotAType.txt b/dhall/tests/type-inference/failure/unit/FunctionTypeOutputTypeNotAType.txt
new file mode 100644
index 0000000..bcc44a5
--- /dev/null
+++ b/dhall/tests/type-inference/failure/unit/FunctionTypeOutputTypeNotAType.txt
@@ -0,0 +1,7 @@
+Type error: error: Expected a type, found: `1`
+ --> <current file>:1:8
+ |
+1 | Bool -> 1
+ | ^ this has type: `Natural`
+ |
+ = help: An expression in type position must have type `Type`, `Kind` or `Sort`
diff --git a/dhall/tests/type-inference/failure/unit/LetInSort.dhall b/dhall/tests/type-inference/failure/unit/LetInSort.dhall
new file mode 100644
index 0000000..125ab28
--- /dev/null
+++ b/dhall/tests/type-inference/failure/unit/LetInSort.dhall
@@ -0,0 +1 @@
+\(x: let x = 0 in Sort) -> 1
diff --git a/dhall/tests/type-inference/failure/unit/LetInSort.txt b/dhall/tests/type-inference/failure/unit/LetInSort.txt
new file mode 100644
index 0000000..07be298
--- /dev/null
+++ b/dhall/tests/type-inference/failure/unit/LetInSort.txt
@@ -0,0 +1,6 @@
+Type error: error: Sort does not have a type
+ --> <current file>:1:18
+ |
+1 | \(x: let x = 0 in Sort) -> 1
+ | ^^^^ Sort does not have a type
+ |
diff --git a/dhall/tests/type-inference/failure/unit/MergeBool.dhall b/dhall/tests/type-inference/failure/unit/MergeBool.dhall
new file mode 100644
index 0000000..01e7e3f
--- /dev/null
+++ b/dhall/tests/type-inference/failure/unit/MergeBool.dhall
@@ -0,0 +1 @@
+\(x: { True: Natural, False: Natural }) -> merge x True
diff --git a/dhall/tests/type-inference/failure/unit/MergeBool.txt b/dhall/tests/type-inference/failure/unit/MergeBool.txt
new file mode 100644
index 0000000..209def1
--- /dev/null
+++ b/dhall/tests/type-inference/failure/unit/MergeBool.txt
@@ -0,0 +1,6 @@
+Type error: error: Merge2ArgMustBeUnionOrOptional
+ --> <current file>:1:43
+ |
+1 | \(x: { True: Natural, False: Natural }) -> merge x True
+ | ^^^^^^^^^^^^ Merge2ArgMustBeUnionOrOptional
+ |
diff --git a/dhall/tests/type-inference/failure/unit/NestedAnnotInnerWrong.dhall b/dhall/tests/type-inference/failure/unit/NestedAnnotInnerWrong.dhall
new file mode 100644
index 0000000..7e5c8ec
--- /dev/null
+++ b/dhall/tests/type-inference/failure/unit/NestedAnnotInnerWrong.dhall
@@ -0,0 +1 @@
+(0 : Bool) : Natural
diff --git a/dhall/tests/type-inference/failure/unit/NestedAnnotInnerWrong.txt b/dhall/tests/type-inference/failure/unit/NestedAnnotInnerWrong.txt
new file mode 100644
index 0000000..b56db54
--- /dev/null
+++ b/dhall/tests/type-inference/failure/unit/NestedAnnotInnerWrong.txt
@@ -0,0 +1,6 @@
+Type error: error: annot mismatch: Natural != Bool
+ --> <current file>:1:1
+ |
+1 | (0 : Bool) : Natural
+ | ^ annot mismatch: Natural != Bool
+ |
diff --git a/dhall/tests/type-inference/failure/unit/NestedAnnotOuterWrong.dhall b/dhall/tests/type-inference/failure/unit/NestedAnnotOuterWrong.dhall
new file mode 100644
index 0000000..67a1526
--- /dev/null
+++ b/dhall/tests/type-inference/failure/unit/NestedAnnotOuterWrong.dhall
@@ -0,0 +1 @@
+(0 : Natural) : Bool
diff --git a/dhall/tests/type-inference/failure/unit/NestedAnnotOuterWrong.txt b/dhall/tests/type-inference/failure/unit/NestedAnnotOuterWrong.txt
new file mode 100644
index 0000000..2f07b8d
--- /dev/null
+++ b/dhall/tests/type-inference/failure/unit/NestedAnnotOuterWrong.txt
@@ -0,0 +1,6 @@
+Type error: error: annot mismatch: Natural != Bool
+ --> <current file>:1:1
+ |
+1 | (0 : Natural) : Bool
+ | ^^^^^^^^^^^ annot mismatch: Natural != Bool
+ |