From 1909985b412866d9fa1dde51d36b1cf7ff6de8a6 Mon Sep 17 00:00:00 2001 From: Ryan Scott <ryan.gl.scott@gmail.com> Date: Wed, 12 Jul 2017 19:26:37 -0400 Subject: [PATCH] Fix some excessive spacing in error messages Test Plan: If it builds, ship it Reviewers: austin, bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3729 --- compiler/typecheck/TcClassDcl.hs | 2 +- .../deriving/should_fail/drvfail011.stderr | 18 +++++++++--------- .../should_compile/Simple2.stderr | 8 ++++---- .../typecheck/should_compile/tc254.stderr | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/compiler/typecheck/TcClassDcl.hs b/compiler/typecheck/TcClassDcl.hs index 470119784631..a3e9549a1c9a 100644 --- a/compiler/typecheck/TcClassDcl.hs +++ b/compiler/typecheck/TcClassDcl.hs @@ -521,5 +521,5 @@ warnMissingAT name -- Warn only if -Wmissing-methods AND not a signature ; warnTc (Reason Opt_WarnMissingMethods) (warn && hsc_src /= HsigFile) (text "No explicit" <+> text "associated type" - <+> text "or default declaration for " + <+> text "or default declaration for" <+> quotes (ppr name)) } diff --git a/testsuite/tests/deriving/should_fail/drvfail011.stderr b/testsuite/tests/deriving/should_fail/drvfail011.stderr index 6ea42e1b08e8..e29f4e799bf9 100644 --- a/testsuite/tests/deriving/should_fail/drvfail011.stderr +++ b/testsuite/tests/deriving/should_fail/drvfail011.stderr @@ -1,10 +1,10 @@ -drvfail011.hs:8:1: - No instance for (Eq a) arising from a use of ‘==’ - Possible fix: add (Eq a) to the context of the instance declaration - In the expression: ((a1 == b1)) - In an equation for ‘==’: (==) (T1 a1) (T1 b1) = ((a1 == b1)) - When typechecking the code for ‘==’ - in a derived instance for ‘Eq (T a)’: - To see the code I am typechecking, use -ddump-deriv - In the instance declaration for ‘Eq (T a)’ +drvfail011.hs:8:1: error: + • No instance for (Eq a) arising from a use of ‘==’ + Possible fix: add (Eq a) to the context of the instance declaration + • In the expression: ((a1 == b1)) + In an equation for ‘==’: (==) (T1 a1) (T1 b1) = ((a1 == b1)) + When typechecking the code for ‘==’ + in a derived instance for ‘Eq (T a)’: + To see the code I am typechecking, use -ddump-deriv + In the instance declaration for ‘Eq (T a)’ diff --git a/testsuite/tests/indexed-types/should_compile/Simple2.stderr b/testsuite/tests/indexed-types/should_compile/Simple2.stderr index 4b3b0f619aea..c43280e79d43 100644 --- a/testsuite/tests/indexed-types/should_compile/Simple2.stderr +++ b/testsuite/tests/indexed-types/should_compile/Simple2.stderr @@ -1,6 +1,6 @@ Simple2.hs:21:1: warning: [-Wmissing-methods (in -Wdefault)] - • No explicit associated type or default declaration for ‘S3n’ + • No explicit associated type or default declaration for ‘S3n’ • In the instance declaration for ‘C3 Char’ Simple2.hs:21:10: warning: [-Wmissing-methods (in -Wdefault)] @@ -9,7 +9,7 @@ Simple2.hs:21:10: warning: [-Wmissing-methods (in -Wdefault)] • In the instance declaration for ‘C3 Char’ Simple2.hs:29:1: warning: [-Wmissing-methods (in -Wdefault)] - • No explicit associated type or default declaration for ‘S3n’ + • No explicit associated type or default declaration for ‘S3n’ • In the instance declaration for ‘C3 Bool’ Simple2.hs:29:10: warning: [-Wmissing-methods (in -Wdefault)] @@ -18,11 +18,11 @@ Simple2.hs:29:10: warning: [-Wmissing-methods (in -Wdefault)] • In the instance declaration for ‘C3 Bool’ Simple2.hs:39:1: warning: [-Wmissing-methods (in -Wdefault)] - • No explicit associated type or default declaration for ‘S3’ + • No explicit associated type or default declaration for ‘S3’ • In the instance declaration for ‘C3 Float’ Simple2.hs:39:1: warning: [-Wmissing-methods (in -Wdefault)] - • No explicit associated type or default declaration for ‘S3n’ + • No explicit associated type or default declaration for ‘S3n’ • In the instance declaration for ‘C3 Float’ Simple2.hs:39:10: warning: [-Wmissing-methods (in -Wdefault)] diff --git a/testsuite/tests/typecheck/should_compile/tc254.stderr b/testsuite/tests/typecheck/should_compile/tc254.stderr index 663279d71a43..2d2c20decb89 100644 --- a/testsuite/tests/typecheck/should_compile/tc254.stderr +++ b/testsuite/tests/typecheck/should_compile/tc254.stderr @@ -1,4 +1,4 @@ tc254.hs:8:1: warning: [-Wmissing-methods (in -Wdefault)] - • No explicit associated type or default declaration for ‘Typ’ + • No explicit associated type or default declaration for ‘Typ’ • In the instance declaration for ‘Cls Int’ -- GitLab