projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b3e58b4
)
[project @ 2003-07-28 10:22:58 by simonpj]
author
simonpj
<unknown>
Mon, 28 Jul 2003 10:22:58 +0000
(10:22 +0000)
committer
simonpj
<unknown>
Mon, 28 Jul 2003 10:22:58 +0000
(10:22 +0000)
Comments only
ghc/compiler/coreSyn/Subst.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/coreSyn/Subst.lhs
b/ghc/compiler/coreSyn/Subst.lhs
index
02ab9fd
..
c406f92
100644
(file)
--- a/
ghc/compiler/coreSyn/Subst.lhs
+++ b/
ghc/compiler/coreSyn/Subst.lhs
@@
-249,6
+249,7
@@
substInScope (Subst in_scope _) = in_scope
zapSubstEnv :: Subst -> Subst
zapSubstEnv (Subst in_scope env) = Subst in_scope emptySubstEnv
zapSubstEnv :: Subst -> Subst
zapSubstEnv (Subst in_scope env) = Subst in_scope emptySubstEnv
+-- ToDo: add an ASSERT that fvs(subst-result) is already in the in-scope set
extendSubst :: Subst -> Var -> SubstResult -> Subst
extendSubst (Subst in_scope env) v r = Subst in_scope (extendSubstEnv env v r)
extendSubst :: Subst -> Var -> SubstResult -> Subst
extendSubst (Subst in_scope env) v r = Subst in_scope (extendSubstEnv env v r)
@@
-390,6
+391,7
@@
zipTyEnv tyvars tys
#endif
= zip_ty_env tyvars tys emptySubstEnv
#endif
= zip_ty_env tyvars tys emptySubstEnv
+-- Later substitutions in the list over-ride earlier ones
zip_ty_env [] [] env = env
zip_ty_env (tv:tvs) (ty:tys) env = zip_ty_env tvs tys (extendSubstEnv env tv (DoneTy ty))
-- There used to be a special case for when
zip_ty_env [] [] env = env
zip_ty_env (tv:tvs) (ty:tys) env = zip_ty_env tvs tys (extendSubstEnv env tv (DoneTy ty))
-- There used to be a special case for when