diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-11-02 22:54:12 +0000 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-11-02 22:54:12 +0000 |
commit | ba38f995d6312aa0cfe15873c8e5e9475e03f19c (patch) | |
tree | 235478e54fd64a2945fcbe620d107a68127ea305 /compiler/specialise | |
parent | ede3bd92710492012eb823e027097a5078133f76 (diff) | |
download | haskell-ba38f995d6312aa0cfe15873c8e5e9475e03f19c.tar.gz |
Avoid putting uniqs in specconstr rules; part of #4012
There's no need to have the uniq in the rule, but its presence can
cause spurious ABI changes.
Diffstat (limited to 'compiler/specialise')
-rw-r--r-- | compiler/specialise/SpecConstr.lhs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/specialise/SpecConstr.lhs b/compiler/specialise/SpecConstr.lhs index 60c40e856f..7a01ee2ee5 100644 --- a/compiler/specialise/SpecConstr.lhs +++ b/compiler/specialise/SpecConstr.lhs @@ -1378,9 +1378,13 @@ spec_one env fn arg_bndrs body (call_pat@(qvars, pats), rule_number) (arg_bndrs `zip` pats) fn_name = idName fn fn_loc = nameSrcSpan fn_name - spec_occ = mkSpecOcc (nameOccName fn_name) - dflags = sc_dflags env - rule_name = mkFastString ("SC:" ++ showSDoc dflags (ppr fn <> int rule_number)) + fn_occ = nameOccName fn_name + spec_occ = mkSpecOcc fn_occ + -- We use fn_occ rather than fn in the rule_name string + -- as we don't want the uniq to end up in the rule, and + -- hence in the ABI, as that can cause spurious ABI + -- changes (#4012). + rule_name = mkFastString ("SC:" ++ occNameString fn_occ ++ show rule_number) spec_name = mkInternalName spec_uniq spec_occ fn_loc -- ; pprTrace "{spec_one" (ppr (sc_count env) <+> ppr fn <+> ppr pats <+> text "-->" <+> ppr spec_name) $ -- return () |