diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-03-30 17:31:59 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-03-31 08:04:11 +0100 |
commit | 9fc65bb85ef3e6386e84e7f9bbe408dede1baf67 (patch) | |
tree | 73ebd22aa9b3bec6f78ddb4a1efaa7e9c846db47 /testsuite/tests/patsyn | |
parent | 0ad2021b39ed39940d0f6332d58c7b6debd366ad (diff) | |
download | haskell-9fc65bb85ef3e6386e84e7f9bbe408dede1baf67.tar.gz |
Refactor error generation for pattern synonyms
The result of a series of patches on type-error messages for
pattern synonyms had become a bit baroque. This tidies it up
a bit. Still not fantastic, but better.
Diffstat (limited to 'testsuite/tests/patsyn')
-rw-r--r-- | testsuite/tests/patsyn/should_fail/T11039.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_fail/T11667.stderr | 16 |
2 files changed, 8 insertions, 10 deletions
diff --git a/testsuite/tests/patsyn/should_fail/T11039.stderr b/testsuite/tests/patsyn/should_fail/T11039.stderr index eea6257f58..9b749d1758 100644 --- a/testsuite/tests/patsyn/should_fail/T11039.stderr +++ b/testsuite/tests/patsyn/should_fail/T11039.stderr @@ -2,7 +2,7 @@ T11039.hs:8:15: error: • Couldn't match type ‘f’ with ‘A’ ‘f’ is a rigid type variable bound by - the type signature of pattern synonym ‘Q’ at T11039.hs:7:14 + the signature for pattern synonym ‘Q’ at T11039.hs:7:14 Expected type: f a Actual type: A a • In the pattern: A a diff --git a/testsuite/tests/patsyn/should_fail/T11667.stderr b/testsuite/tests/patsyn/should_fail/T11667.stderr index 6befe1386c..95b6e929ad 100644 --- a/testsuite/tests/patsyn/should_fail/T11667.stderr +++ b/testsuite/tests/patsyn/should_fail/T11667.stderr @@ -2,11 +2,11 @@ T11667.hs:12:22: error: • Could not deduce (Num a) arising from the literal ‘42’ from the context: Eq a - bound by the type signature of pattern synonym ‘Pat1’ + bound by the signature for pattern synonym ‘Pat1’ at T11667.hs:12:9-12 Possible fix: - add (Num a) to the context of - the type signature of pattern synonym ‘Pat1’ + add (Num a) to the "required" context of + the signature for pattern synonym ‘Pat1’ • In the pattern: 42 In the pattern: Just 42 In the declaration for pattern synonym ‘Pat1’ @@ -16,7 +16,7 @@ T11667.hs:18:28: error: arising from the "provided" constraints claimed by the signature of ‘Pat2’ ‘b’ is a rigid type variable bound by - the type signature of pattern synonym ‘Pat2’ at T11667.hs:17:17 + the signature for pattern synonym ‘Pat2’ at T11667.hs:17:17 • In the declaration for pattern synonym ‘Pat2’ • Relevant bindings include y :: b (bound at T11667.hs:18:21) @@ -32,12 +32,10 @@ T11667.hs:24:24: error: T11667.hs:31:16: error: • Could not deduce (Num a) arising from a use of ‘MkS’ from the context: (Eq a, Show a) - bound by the type signature for bidirectional pattern synonym ‘Pat4’ - when used in an expression context: - (Eq a, Show a) => S a + bound by the signature for pattern synonym ‘Pat4’ at T11667.hs:31:1-21 Possible fix: - add (Num a) to the context of - the type signature of pattern synonym ‘Pat4’ + add (Num a) to the "required" context of + the signature for pattern synonym ‘Pat4’ • In the expression: MkS 42 In an equation for ‘$bPat4’: $bPat4 = MkS 42 |