From eef96a799e366e63b0fb42c97daf7bcb7f1a8677 Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 28 Jul 2003 10:22:58 +0000 Subject: [PATCH] [project @ 2003-07-28 10:22:58 by simonpj] Comments only --- ghc/compiler/coreSyn/Subst.lhs | 2 ++ 1 file changed, 2 insertions(+) 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 -- 1.7.10.4