From: simonpj Date: Mon, 28 Jul 2003 10:22:58 +0000 (+0000) Subject: [project @ 2003-07-28 10:22:58 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~623 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=eef96a799e366e63b0fb42c97daf7bcb7f1a8677 [project @ 2003-07-28 10:22:58 by simonpj] Comments only --- diff --git a/ghc/compiler/coreSyn/Subst.lhs b/ghc/compiler/coreSyn/Subst.lhs index 02ab9fd..c406f92 100644 --- 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 +-- 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) @@ -390,6 +391,7 @@ zipTyEnv tyvars tys #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