X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2FcoreSyn%2FCoreSubst.lhs;h=ba70dbe0bfc7c579f999b96f4170b3b43fb03771;hb=37df27c6f21452c60c45b5cf6defc9003a41da15;hp=6a2255cf8726fced0948731f492ce452d9d59dd5;hpb=cac2aca1e1874e936f3ef15ca2a81a32c7863750;p=ghc-hetmet.git diff --git a/compiler/coreSyn/CoreSubst.lhs b/compiler/coreSyn/CoreSubst.lhs index 6a2255c..ba70dbe 100644 --- a/compiler/coreSyn/CoreSubst.lhs +++ b/compiler/coreSyn/CoreSubst.lhs @@ -6,6 +6,13 @@ Utility functions on @Core@ syntax \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module CoreSubst ( -- Substitution stuff Subst, TvSubstEnv, IdSubstEnv, InScopeSet, @@ -45,6 +52,8 @@ import Outputable import PprCore () -- Instances import Util import FastTypes + +import Data.List \end{code} @@ -307,6 +316,7 @@ substRecBndrs subst bndrs substIdBndr :: Subst -- Substitution to use for the IdInfo -> Subst -> Id -- Substitition and Id to transform -> (Subst, Id) -- Transformed pair + -- NB: unfolding may be zapped substIdBndr rec_subst subst@(Subst in_scope env tvs) old_id = (Subst (in_scope `extendInScopeSet` new_id) new_env tvs, new_id) @@ -324,6 +334,7 @@ substIdBndr rec_subst subst@(Subst in_scope env tvs) old_id -- rec_subst, when dealing with a mutually-recursive group new_id = maybeModifyIdInfo mb_new_info id2 mb_new_info = substIdInfo rec_subst (idInfo id2) + -- NB: unfolding info may be zapped -- Extend the substitution if the unique has changed -- See the notes with substTyVarBndr for the delVarEnv