From 70263bb4535c40ffa73548e3f0b4b574a856d764 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 11 Nov 2019 09:44:24 +0000 Subject: Test type error messages --- dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt (limited to 'dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt') diff --git a/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt b/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt new file mode 100644 index 0000000..2808281 --- /dev/null +++ b/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt @@ -0,0 +1 @@ +TypeError { type_message: TypeMismatch(Value@Unevaled { value: AppliedBuiltin(List, []), type: Value@WHNF { value: Pi(AlphaLabel(`_`), Type, Type), type: Kind } }, Type, Type), context: TypecheckContext([]) } -- cgit v1.2.3 From 539ab468dfeca7a7b863d5166b2516a2573c044e Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 11 Nov 2019 10:33:45 +0000 Subject: Implement basicest Display for TypeError --- dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt') diff --git a/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt b/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt index 2808281..ab75f15 100644 --- a/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt +++ b/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt @@ -1 +1 @@ -TypeError { type_message: TypeMismatch(Value@Unevaled { value: AppliedBuiltin(List, []), type: Value@WHNF { value: Pi(AlphaLabel(`_`), Type, Type), type: Kind } }, Type, Type), context: TypecheckContext([]) } +Type error: Wrong type of function argument -- cgit v1.2.3 From c9c248a4cab21fa1ae7692cd193e3b2c698d431d Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 11 Nov 2019 13:49:47 +0000 Subject: Add a few more pretty errors --- dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt') diff --git a/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt b/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt index ab75f15..bc5cc40 100644 --- a/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt +++ b/dhall/tests/type-errors/unit/ListLiteralEmptyNotType.txt @@ -1 +1,6 @@ -Type error: Wrong type of function argument + --> 1:6 + | +1 | [] : List Type␊ + | ^--^ + | + = Type error: Wrong type of function argument -- cgit v1.2.3