[commit: ghc] master: Stop uniques ending up in SPEC rule names (0f7a369)

git at git.haskell.org git at git.haskell.org
Mon Feb 27 14:11:33 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/0f7a369f78b7ef05d958d331bb02ad2d361abee0/ghc

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

commit 0f7a369f78b7ef05d958d331bb02ad2d361abee0
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Feb 27 09:09:26 2017 -0500

    Stop uniques ending up in SPEC rule names
    
    Reviewers: austin, bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D3191


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

0f7a369f78b7ef05d958d331bb02ad2d361abee0
 compiler/specialise/Specialise.hs | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/compiler/specialise/Specialise.hs b/compiler/specialise/Specialise.hs
index 0090417..9e189df 100644
--- a/compiler/specialise/Specialise.hs
+++ b/compiler/specialise/Specialise.hs
@@ -1293,10 +1293,11 @@ specCalls mb_mod env rules_for_me calls_for_me fn rhs
                            Just this_mod  -- Specialising imoprted fn
                                -> text "SPEC/" <> ppr this_mod
 
-                rule_name = mkFastString $ showSDocForUser dflags neverQualify $
-                            herald <+> ppr fn <+> hsep (map ppr_call_key_ty call_ts)
-                            -- This name ends up in interface files, so use showSDocForUser,
-                            -- otherwise uniques end up there, making builds
+                rule_name = mkFastString $ showSDoc dflags $
+                            herald <+> ftext (occNameFS (getOccName fn))
+                                   <+> hsep (map ppr_call_key_ty call_ts)
+                            -- This name ends up in interface files, so use occNameString.
+                            -- Otherwise uniques end up there, making builds
                             -- less deterministic (See #4012 comment:61 ff)
 
                 rule_wout_eta = mkRule



More information about the ghc-commits mailing list