[commit: ghc] : Slight cleanup in applyAbsVars: loop with an InScopeSet instead of VarSet (a1355a8)

Max Bolingbroke <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : 

http://hackage.haskell.org/trac/ghc/changeset/a1355a8c16d76f3c5aa5e7c0424c649415e0a18c

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

commit a1355a8c16d76f3c5aa5e7c0424c649415e0a18c
Author: Max Bolingbroke <[email protected]>
Date:   Fri Apr 20 11:12:12 2012 +0100

    Slight cleanup in applyAbsVars: loop with an InScopeSet instead of VarSet

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

 .../supercompile/Supercompile/Drive/Process.hs     |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/supercompile/Supercompile/Drive/Process.hs b/compiler/supercompile/Supercompile/Drive/Process.hs
index b60cb4a..e8c7a01 100644
--- a/compiler/supercompile/Supercompile/Drive/Process.hs
+++ b/compiler/supercompile/Supercompile/Drive/Process.hs
@@ -762,7 +762,7 @@ absVarLambdas :: Symantics ann => [AbsVar] -> ann (TermF ann) -> ann (TermF ann)
 absVarLambdas xs = tyVarIdLambdas (map absVarBinder xs)
 
 applyAbsVars :: Symantics ann => Var -> Maybe (M.Map Var Var) -> [AbsVar] -> ann (TermF ann)
-applyAbsVars x mb_xs_rn xs = snd $ snd $ foldl go (unitVarSet x, (emptyRenaming, var x)) xs
+applyAbsVars x mb_xs_rn xs = snd $ snd $ foldl go (mkInScopeSet (unitVarSet x), (emptyRenaming, var x)) xs
   where
    go (fvs, (ty_rn, e)) absx = case absVarDead absx of
     True -> (fvs, case () of
@@ -820,9 +820,9 @@ applyAbsVars x mb_xs_rn xs = snd $ snd $ foldl go (unitVarSet x, (emptyRenaming,
          -> (ty_rn, let_ x (e_repr `cast` mkUnsafeCo e_repr_ty ty) (e `app` x)))
          where -- NB: dead binders are not present in the renaming, so don't attempt to look them up
                shadowy_x = renameAbsVarType ty_rn (absVarBinder absx)
-               x = uniqAway (mkInScopeSet fvs) shadowy_x
+               x = uniqAway fvs shadowy_x
                ty = idType x
-    False -> (fvs `extendVarSet` x', case () of
+    False -> (fvs `extendInScopeSet` x', case () of
       () | isTyVar x
          -> (insertTypeSubst ty_rn x (mkTyVarTy x'), e `tyApp` mkTyVarTy x')
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.