[commit: ghc] master: Kill nameSetElems in rnCmdTop (be47085)

git at git.haskell.org git at git.haskell.org
Thu Jun 2 19:46:46 UTC 2016


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

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

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

commit be4708513fc04dd9c9c99fe652503866ecd85c15
Author: Bartosz Nitka <niteria at gmail.com>
Date:   Thu Jun 2 11:38:11 2016 -0700

    Kill nameSetElems in rnCmdTop
    
    This change isn't necessary for determinism. appAName, choiceAName,
    loopAName all have pre-allocated Uniques and their relative order
    can't change. I opted to use nameSetElemsStable here because:
    * the cost is negligible
    * it's less fragile than just documenting
    
    Test Plan: ./validate
    
    Reviewers: simonpj, austin, bgamari, simonmar
    
    Reviewed By: simonmar
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2292
    
    GHC Trac Issues: #4012


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

be4708513fc04dd9c9c99fe652503866ecd85c15
 compiler/rename/RnExpr.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/rename/RnExpr.hs b/compiler/rename/RnExpr.hs
index af58135..32277b4 100644
--- a/compiler/rename/RnExpr.hs
+++ b/compiler/rename/RnExpr.hs
@@ -441,7 +441,7 @@ rnCmdTop = wrapLocFstM rnCmdTop'
   rnCmdTop' (HsCmdTop cmd _ _ _)
    = do { (cmd', fvCmd) <- rnLCmd cmd
         ; let cmd_names = [arrAName, composeAName, firstAName] ++
-                          nameSetElems (methodNamesCmd (unLoc cmd'))
+                          nameSetElemsStable (methodNamesCmd (unLoc cmd'))
         -- Generate the rebindable syntax for the monad
         ; (cmd_names', cmd_fvs) <- lookupSyntaxNames cmd_names
 



More information about the ghc-commits mailing list