From 70eede4fd012f49dfab0e2e27fb3a4e4bbff6325 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 1 Feb 2020 22:04:34 +0000 Subject: Implement once nice error using annotate_snippets --- dhall/tests/type-errors/hurkensParadox.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'dhall/tests/type-errors/hurkensParadox.txt') diff --git a/dhall/tests/type-errors/hurkensParadox.txt b/dhall/tests/type-errors/hurkensParadox.txt index 4dfdcf5..10bb9a4 100644 --- a/dhall/tests/type-errors/hurkensParadox.txt +++ b/dhall/tests/type-errors/hurkensParadox.txt @@ -1 +1,14 @@ -Type error: Unhandled error: function annot mismatch: (U : Sort) : Kind +Type error: Unhandled error: error: function annot mismatch + --> :6:23 + | + 1 | let bottom : Type = ∀(any : Type) → any + 2 | + 3 | in let not : Type → Type = λ(p : Type) → p → bottom + 4 | +... +10 | : pow (pow U) → U +11 | = λ(t : pow (pow U)) + | ^^^^^ function annot mismatch + | --- help: this expects an argument of type: Kind + | - help: but this has type: Sort + | -- cgit v1.2.3 From 92bbea48f9a0380a614f2687c73d55a67ff9294e Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 2 Feb 2020 15:02:23 +0000 Subject: More nice errors plus some refactor --- dhall/tests/type-errors/hurkensParadox.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dhall/tests/type-errors/hurkensParadox.txt') diff --git a/dhall/tests/type-errors/hurkensParadox.txt b/dhall/tests/type-errors/hurkensParadox.txt index 10bb9a4..e06c4b2 100644 --- a/dhall/tests/type-errors/hurkensParadox.txt +++ b/dhall/tests/type-errors/hurkensParadox.txt @@ -1,4 +1,4 @@ -Type error: Unhandled error: error: function annot mismatch +Type error: Unhandled error: error: Wrong type of function argument --> :6:23 | 1 | let bottom : Type = ∀(any : Type) → any @@ -8,7 +8,7 @@ Type error: Unhandled error: error: function annot mismatch ... 10 | : pow (pow U) → U 11 | = λ(t : pow (pow U)) - | ^^^^^ function annot mismatch + | ^^^^^ Wrong type of function argument | --- help: this expects an argument of type: Kind | - help: but this has type: Sort | -- cgit v1.2.3 From d8c3ced0f1acb1924c801fadbfd3077dede9b0dd Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 2 Feb 2020 17:22:27 +0000 Subject: More errors --- dhall/tests/type-errors/hurkensParadox.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dhall/tests/type-errors/hurkensParadox.txt') diff --git a/dhall/tests/type-errors/hurkensParadox.txt b/dhall/tests/type-errors/hurkensParadox.txt index e06c4b2..5241517 100644 --- a/dhall/tests/type-errors/hurkensParadox.txt +++ b/dhall/tests/type-errors/hurkensParadox.txt @@ -9,6 +9,6 @@ Type error: Unhandled error: error: Wrong type of function argument 10 | : pow (pow U) → U 11 | = λ(t : pow (pow U)) | ^^^^^ Wrong type of function argument - | --- help: this expects an argument of type: Kind - | - help: but this has type: Sort + | ^^^ this expects an argument of type: Kind + | ^ but this has type: Sort | -- cgit v1.2.3 From f3681f7a32ddb78db4d564769b50b697c54ebeac Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 2 Feb 2020 18:03:03 +0000 Subject: Tweak errors --- dhall/tests/type-errors/hurkensParadox.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dhall/tests/type-errors/hurkensParadox.txt') diff --git a/dhall/tests/type-errors/hurkensParadox.txt b/dhall/tests/type-errors/hurkensParadox.txt index 5241517..522e1a2 100644 --- a/dhall/tests/type-errors/hurkensParadox.txt +++ b/dhall/tests/type-errors/hurkensParadox.txt @@ -1,4 +1,4 @@ -Type error: Unhandled error: error: Wrong type of function argument +Type error: Unhandled error: error: wrong type of function argument --> :6:23 | 1 | let bottom : Type = ∀(any : Type) → any @@ -8,7 +8,8 @@ Type error: Unhandled error: error: Wrong type of function argument ... 10 | : pow (pow U) → U 11 | = λ(t : pow (pow U)) - | ^^^^^ Wrong type of function argument | ^^^ this expects an argument of type: Kind | ^ but this has type: Sort | + = note: expected type `Kind` + found type `Sort` -- cgit v1.2.3