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/FunctionTypeArgumentTypeNotAType.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt (limited to 'dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt') diff --git a/dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt b/dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt new file mode 100644 index 0000000..65825de --- /dev/null +++ b/dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt @@ -0,0 +1 @@ +TypeError { type_message: InvalidInputType(Value@Unevaled { value: PartialExpr(NaturalLit(2)), type: Value@WHNF { value: AppliedBuiltin(Natural, []), 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/FunctionTypeArgumentTypeNotAType.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt') diff --git a/dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt b/dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt index 65825de..faea460 100644 --- a/dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt +++ b/dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt @@ -1 +1 @@ -TypeError { type_message: InvalidInputType(Value@Unevaled { value: PartialExpr(NaturalLit(2)), type: Value@WHNF { value: AppliedBuiltin(Natural, []), type: Type } }), context: TypecheckContext([]) } +Type error: Invalid function input -- 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/FunctionTypeArgumentTypeNotAType.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt') diff --git a/dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt b/dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt index faea460..dd2e758 100644 --- a/dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt +++ b/dhall/tests/type-errors/unit/FunctionTypeArgumentTypeNotAType.txt @@ -1 +1,6 @@ -Type error: Invalid function input + --> 1:1 + | +1 | 2 → _␊ + | ^ + | + = Type error: Invalid function input -- cgit v1.2.3