[commit: ghc] master: Fix some excessive spacing in error messages (1909985)

git at git.haskell.org git at git.haskell.org
Wed Jul 12 23:28:22 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/1909985b412866d9fa1dde51d36b1cf7ff6de8a6/ghc

>---------------------------------------------------------------

commit 1909985b412866d9fa1dde51d36b1cf7ff6de8a6
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Wed Jul 12 19:26:37 2017 -0400

    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


>---------------------------------------------------------------

1909985b412866d9fa1dde51d36b1cf7ff6de8a6
 compiler/typecheck/TcClassDcl.hs                       |  2 +-
 testsuite/tests/deriving/should_fail/drvfail011.stderr | 18 +++++++++---------
 .../tests/indexed-types/should_compile/Simple2.stderr  |  8 ++++----
 testsuite/tests/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 4701197..a3e9549 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 6ea42e1..e29f4e7 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 4b3b0f6..c43280e 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 663279d..2d2c20d 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’



More information about the ghc-commits mailing list