diff options
author | Mike Izbicki <mike@izbicki.me> | 2014-11-19 18:29:37 -0600 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-11-19 19:49:37 -0600 |
commit | bc2289e13d9586be087bd8136943dc35a0130c88 (patch) | |
tree | a45489dbdba4380c4aa532599155f878e5cbaa43 /testsuite/tests | |
parent | d87fa343cd5d298c9fea96d65d05a20929ff97d0 (diff) | |
download | haskell-bc2289e13d9586be087bd8136943dc35a0130c88.tar.gz |
ghc generates more user-friendly error messages
Test Plan: Compiled ghc fine. Opened ghci and fed it invalid code. It gave the improved error messages in response.
Reviewers: austin
Subscribers: thomie, simonpj, spacekitteh, rwbarton, simonmar, carter
Differential Revision: https://phabricator.haskell.org/D201
Diffstat (limited to 'testsuite/tests')
10 files changed, 29 insertions, 9 deletions
diff --git a/testsuite/tests/annotations/should_fail/annfail08.stderr b/testsuite/tests/annotations/should_fail/annfail08.stderr index b2d119de68..0449033685 100644 --- a/testsuite/tests/annotations/should_fail/annfail08.stderr +++ b/testsuite/tests/annotations/should_fail/annfail08.stderr @@ -1,9 +1,12 @@ annfail08.hs:9:1: No instance for (Data.Data.Data (a0 -> a0)) + (maybe you haven't applied enough arguments to a function?) arising from an annotation In the annotation: {-# ANN f (id + 1) #-} annfail08.hs:9:15: - No instance for (Num (a0 -> a0)) arising from a use of ‘+’ + No instance for (Num (a0 -> a0)) + (maybe you haven't applied enough arguments to a function?) + arising from a use of ‘+’ In the annotation: {-# ANN f (id + 1) #-} diff --git a/testsuite/tests/deriving/should_fail/drvfail007.stderr b/testsuite/tests/deriving/should_fail/drvfail007.stderr index 183a5ff8d5..91cf8bfa38 100644 --- a/testsuite/tests/deriving/should_fail/drvfail007.stderr +++ b/testsuite/tests/deriving/should_fail/drvfail007.stderr @@ -1,6 +1,7 @@ drvfail007.hs:4:38: No instance for (Eq (Int -> Int)) + (maybe you haven't applied enough arguments to a function?) arising from the first field of ‘Foo’ (type ‘Int -> Int’) Possible fix: use a standalone 'deriving instance' declaration, diff --git a/testsuite/tests/ghci.debugger/scripts/break003.stderr b/testsuite/tests/ghci.debugger/scripts/break003.stderr index 5baf41bcdf..7a9c08ec2f 100644 --- a/testsuite/tests/ghci.debugger/scripts/break003.stderr +++ b/testsuite/tests/ghci.debugger/scripts/break003.stderr @@ -1,4 +1,6 @@ <interactive>:5:1: - No instance for (Show (t -> t1)) arising from a use of ‘print’ + No instance for (Show (t -> t1)) + (maybe you haven't applied enough arguments to a function?) + arising from a use of ‘print’ In a stmt of an interactive GHCi command: print it diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr index cbd2f3b64d..4f58b02695 100644 --- a/testsuite/tests/ghci/scripts/Defer02.stderr +++ b/testsuite/tests/ghci/scripts/Defer02.stderr @@ -27,7 +27,9 @@ In an equation for ‘c’: c (C2 x) = True ../../typecheck/should_run/Defer01.hs:28:5: Warning: - No instance for (Num (a -> a)) arising from the literal ‘1’ + No instance for (Num (a -> a)) + (maybe you haven't applied enough arguments to a function?) + arising from the literal ‘1’ In the expression: 1 In an equation for ‘d’: d = 1 @@ -133,7 +135,9 @@ In the first argument of ‘c’, namely ‘(C2 True)’ In the first argument of ‘print’, namely ‘(c (C2 True))’ *** Exception: ../../typecheck/should_run/Defer01.hs:28:5: - No instance for (Num (a -> a)) arising from the literal ‘1’ + No instance for (Num (a -> a)) + (maybe you haven't applied enough arguments to a function?) + arising from the literal ‘1’ In the expression: 1 In an equation for ‘d’: d = 1 (deferred type error) diff --git a/testsuite/tests/mdo/should_fail/mdofail005.stderr b/testsuite/tests/mdo/should_fail/mdofail005.stderr index 548129117a..594fea2a19 100644 --- a/testsuite/tests/mdo/should_fail/mdofail005.stderr +++ b/testsuite/tests/mdo/should_fail/mdofail005.stderr @@ -1,2 +1,4 @@ -mdofail005.hs:11:14: parse error on input ‘<-’ +mdofail005.hs:11:14: + parse error on input ‘<-’ + Perhaps this statement should be within a 'do' block? diff --git a/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr b/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr index 147c8fef9c..5a3f1cc080 100644 --- a/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr +++ b/testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr @@ -1,2 +1,2 @@ -ParserNoLambdaCase.hs:3:6: parse error on input ‘case’ +ParserNoLambdaCase.hs:3:5: parse error: naked lambda expression '' diff --git a/testsuite/tests/parser/should_fail/readFail020.stderr b/testsuite/tests/parser/should_fail/readFail020.stderr index 0e3bde41da..0c00cdc79b 100644 --- a/testsuite/tests/parser/should_fail/readFail020.stderr +++ b/testsuite/tests/parser/should_fail/readFail020.stderr @@ -1,2 +1,3 @@ -readFail020.hs:3:16: parse error on input ‘}’ +readFail020.hs:3:5: + parse error in let binding: missing required 'in' diff --git a/testsuite/tests/parser/should_fail/readFail040.stderr b/testsuite/tests/parser/should_fail/readFail040.stderr index 6cbb3ce525..728090b9ec 100644 --- a/testsuite/tests/parser/should_fail/readFail040.stderr +++ b/testsuite/tests/parser/should_fail/readFail040.stderr @@ -1,2 +1,4 @@ -readFail040.hs:7:11: parse error on input ‘<-’ +readFail040.hs:7:11: + parse error on input ‘<-’ + Perhaps this statement should be within a 'do' block? diff --git a/testsuite/tests/rebindable/rebindable6.stderr b/testsuite/tests/rebindable/rebindable6.stderr index a02563f3ca..b9ae82096b 100644 --- a/testsuite/tests/rebindable/rebindable6.stderr +++ b/testsuite/tests/rebindable/rebindable6.stderr @@ -1,6 +1,7 @@ rebindable6.hs:106:17: No instance for (HasSeq (IO a -> t0 -> IO b)) + (maybe you haven't applied enough arguments to a function?) arising from a do statement The type variable ‘t0’ is ambiguous Relevant bindings include @@ -24,6 +25,7 @@ rebindable6.hs:106:17: rebindable6.hs:107:17: No instance for (HasFail ([Prelude.Char] -> t1)) + (maybe you haven't applied enough arguments to a function?) arising from a do statement The type variable ‘t1’ is ambiguous Note: there is a potential instance available: @@ -42,6 +44,7 @@ rebindable6.hs:107:17: rebindable6.hs:108:17: No instance for (HasReturn (b -> t1)) + (maybe you haven't applied enough arguments to a function?) arising from a use of ‘return’ The type variable ‘t1’ is ambiguous Relevant bindings include diff --git a/testsuite/tests/typecheck/should_fail/T2846b.stderr b/testsuite/tests/typecheck/should_fail/T2846b.stderr index 34d24ae8f6..ccf4f149ee 100644 --- a/testsuite/tests/typecheck/should_fail/T2846b.stderr +++ b/testsuite/tests/typecheck/should_fail/T2846b.stderr @@ -1,5 +1,7 @@ T2846b.hs:5:5: - No instance for (Show (Num a0 => a0)) arising from a use of ‘show’ + No instance for (Show (Num a0 => a0)) + (maybe you haven't applied enough arguments to a function?) + arising from a use of ‘show’ In the expression: show ([1, 2, 3] :: [Num a => a]) In an equation for ‘f’: f = show ([1, 2, 3] :: [Num a => a]) |