[commit: ghc] master: Put quotes round a Name in an error message (6ca7b84)

git at git.haskell.org git at git.haskell.org
Tue Apr 7 14:10:59 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/6ca7b847ffc2c46b7fdde059bb57422354b3da89/ghc

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

commit 6ca7b847ffc2c46b7fdde059bb57422354b3da89
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Apr 7 14:06:11 2015 +0100

    Put quotes round a Name in an error message
    
    Cosmetic consistency only


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

6ca7b847ffc2c46b7fdde059bb57422354b3da89
 compiler/typecheck/TcRnDriver.hs                       |  8 ++++----
 testsuite/tests/driver/sigof04/sigof04.stderr          |  2 +-
 testsuite/tests/rename/should_fail/rnfail047.stderr    |  2 +-
 testsuite/tests/rename/should_fail/rnfail055.stderr    |  6 +++---
 testsuite/tests/simplCore/should_compile/T3717.stderr  | 17 ++++++++---------
 testsuite/tests/typecheck/should_fail/tcfail222.stderr |  2 +-
 6 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/compiler/typecheck/TcRnDriver.hs b/compiler/typecheck/TcRnDriver.hs
index 9d3a1fa..170445b 100644
--- a/compiler/typecheck/TcRnDriver.hs
+++ b/compiler/typecheck/TcRnDriver.hs
@@ -1043,10 +1043,10 @@ emptyRnEnv2 = mkRnEnv2 emptyInScopeSet
 ----------------
 missingBootThing :: Bool -> Name -> String -> SDoc
 missingBootThing is_boot name what
-  = ppr name <+> ptext (sLit "is exported by the") <+>
-              (if is_boot then ptext (sLit "hs-boot") else ptext (sLit "hsig"))
-              <+> ptext (sLit "file, but not")
-              <+> text what <+> ptext (sLit "the module")
+  = quotes (ppr name) <+> ptext (sLit "is exported by the")
+    <+> (if is_boot then ptext (sLit "hs-boot") else ptext (sLit "hsig"))
+    <+> ptext (sLit "file, but not")
+    <+> text what <+> ptext (sLit "the module")
 
 bootMisMatch :: Bool -> SDoc -> TyThing -> TyThing -> SDoc
 bootMisMatch is_boot extra_info real_thing boot_thing
diff --git a/testsuite/tests/driver/sigof04/sigof04.stderr b/testsuite/tests/driver/sigof04/sigof04.stderr
index acb0467..4be1bfd 100644
--- a/testsuite/tests/driver/sigof04/sigof04.stderr
+++ b/testsuite/tests/driver/sigof04/sigof04.stderr
@@ -1,3 +1,3 @@
 
 <no location info>:
-    insert is exported by the hsig file, but not exported by the module
+    ‘insert’ is exported by the hsig file, but not exported by the module
diff --git a/testsuite/tests/rename/should_fail/rnfail047.stderr b/testsuite/tests/rename/should_fail/rnfail047.stderr
index 380bbd9..f62870e 100644
--- a/testsuite/tests/rename/should_fail/rnfail047.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail047.stderr
@@ -1,3 +1,3 @@
 
 RnFail047_A.hs-boot:5:1:
-    RnFail047_A.y is exported by the hs-boot file, but not exported by the module
+    ‘RnFail047_A.y’ is exported by the hs-boot file, but not exported by the module
diff --git a/testsuite/tests/rename/should_fail/rnfail055.stderr b/testsuite/tests/rename/should_fail/rnfail055.stderr
index 1c002ac..05cec42 100644
--- a/testsuite/tests/rename/should_fail/rnfail055.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail055.stderr
@@ -44,10 +44,10 @@ RnFail055.hs-boot:14:1:
     The datatype contexts do not match
 
 RnFail055.hs-boot:16:11:
-    T3 is exported by the hs-boot file, but not exported by the module
+    ‘T3’ is exported by the hs-boot file, but not exported by the module
 
 RnFail055.hs-boot:17:12:
-    T3' is exported by the hs-boot file, but not exported by the module
+    ‘T3'’ is exported by the hs-boot file, but not exported by the module
 
 RnFail055.hs-boot:21:1:
     Type constructor ‘T5’ has conflicting definitions in the module
@@ -76,7 +76,7 @@ RnFail055.hs-boot:25:1:
     The constructors do not match: The types for ‘T7’ differ
 
 RnFail055.hs-boot:27:22:
-    RnFail055.m1 is exported by the hs-boot file, but not exported by the module
+    ‘RnFail055.m1’ is exported by the hs-boot file, but not exported by the module
 
 RnFail055.hs-boot:28:1:
     Class ‘C2’ has conflicting definitions in the module
diff --git a/testsuite/tests/simplCore/should_compile/T3717.stderr b/testsuite/tests/simplCore/should_compile/T3717.stderr
index a437bb8..d466e32 100644
--- a/testsuite/tests/simplCore/should_compile/T3717.stderr
+++ b/testsuite/tests/simplCore/should_compile/T3717.stderr
@@ -3,13 +3,12 @@
 Result size of Tidy Core = {terms: 22, types: 10, coercions: 0}
 
 Rec {
-T3717.$wfoo [InlPrag=[0], Occ=LoopBreaker]
-  :: GHC.Prim.Int# -> GHC.Prim.Int#
+$wfoo [InlPrag=[0], Occ=LoopBreaker] :: Int# -> Int#
 [GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,1*U>]
-T3717.$wfoo =
-  \ (ww :: GHC.Prim.Int#) ->
+$wfoo =
+  \ (ww :: Int#) ->
     case ww of ds {
-      __DEFAULT -> T3717.$wfoo (GHC.Prim.-# ds 1#);
+      __DEFAULT -> $wfoo (-# ds 1#);
       0# -> 0#
     }
 end Rec }
@@ -23,13 +22,13 @@ foo [InlPrag=INLINE[0]] :: Int -> Int
          WorkFree=True, Expandable=True,
          Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
          Tmpl= \ (w [Occ=Once!] :: Int) ->
-                 case w of _ [Occ=Dead] { GHC.Types.I# ww1 [Occ=Once] ->
-                 case T3717.$wfoo ww1 of ww2 { __DEFAULT -> GHC.Types.I# ww2 }
+                 case w of _ [Occ=Dead] { I# ww1 [Occ=Once] ->
+                 case $wfoo ww1 of ww2 { __DEFAULT -> I# ww2 }
                  }}]
 foo =
   \ (w :: Int) ->
-    case w of _ [Occ=Dead] { GHC.Types.I# ww1 ->
-    case T3717.$wfoo ww1 of ww2 { __DEFAULT -> GHC.Types.I# ww2 }
+    case w of _ [Occ=Dead] { I# ww1 ->
+    case $wfoo ww1 of ww2 { __DEFAULT -> I# ww2 }
     }
 
 
diff --git a/testsuite/tests/typecheck/should_fail/tcfail222.stderr b/testsuite/tests/typecheck/should_fail/tcfail222.stderr
index 86242b1..1293b78 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail222.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail222.stderr
@@ -1,4 +1,4 @@
 [1 of 1] Compiling ShouldFail[sig of Data.STRef] ( tcfail222.hsig, nothing )
 
 <no location info>:
-    newSTRef is exported by the hsig file, but not exported by the module
+    ‘newSTRef’ is exported by the hsig file, but not exported by the module



More information about the ghc-commits mailing list