diff options
author | simonpj <unknown> | 2001-06-28 08:36:30 +0000 |
---|---|---|
committer | simonpj <unknown> | 2001-06-28 08:36:30 +0000 |
commit | 17fdd8ad14910060688239d99fa12968276d4095 (patch) | |
tree | 76f4bf37e1ae6831d5f1339aa2664ebdc8411255 | |
parent | 1928f698124fd006958377585ffb37817de1ab76 (diff) | |
download | haskell-17fdd8ad14910060688239d99fa12968276d4095.tar.gz |
[project @ 2001-06-28 08:36:30 by simonpj]
Comment and import wibbles
-rw-r--r-- | ghc/compiler/coreSyn/CoreUtils.lhs | 2 | ||||
-rw-r--r-- | ghc/compiler/coreSyn/Subst.lhs | 15 | ||||
-rw-r--r-- | ghc/compiler/stranal/StrictAnal.lhs | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/ghc/compiler/coreSyn/CoreUtils.lhs b/ghc/compiler/coreSyn/CoreUtils.lhs index b3cab6699d..bea8316a26 100644 --- a/ghc/compiler/coreSyn/CoreUtils.lhs +++ b/ghc/compiler/coreSyn/CoreUtils.lhs @@ -512,7 +512,7 @@ idAppIsBottom id n_val_args = appIsBottom (idStrictness id) n_val_args \end{code} @exprIsValue@ returns true for expressions that are certainly *already* -evaluated to WHNF. This is used to decide wether it's ok to change +evaluated to WHNF. This is used to decide whether it's ok to change case x of _ -> e ===> e and to decide whether it's safe to discard a `seq` diff --git a/ghc/compiler/coreSyn/Subst.lhs b/ghc/compiler/coreSyn/Subst.lhs index 0b88ea00d7..1633362611 100644 --- a/ghc/compiler/coreSyn/Subst.lhs +++ b/ghc/compiler/coreSyn/Subst.lhs @@ -544,10 +544,9 @@ substExpr subst expr simplBndr :: Subst -> Var -> (Subst, Var) -- Used for lambda and case-bound variables -- Clone Id if necessary, substitute type --- Return with IdInfo already substituted, --- but occurrence info zapped +-- Return with IdInfo already substituted, but (fragile) occurrence info zapped -- The substitution is extended only if the variable is cloned, because --- we don't need to use it to track occurrence info. +-- we *don't* need to use it to track occurrence info. simplBndr subst bndr | isTyVar bndr = substTyVar subst bndr | otherwise = subst_id isFragileOcc subst subst bndr @@ -559,9 +558,11 @@ simplLetId :: Subst -> Id -> (Subst, Id) -- Clone Id if necessary -- Substitute its type -- Return an Id with completely zapped IdInfo --- Augment the subtitution if the unique changed or if there's --- interesting occurrence info --- [A subsequent substIdInfo will restore its IdInfo] +-- [A subsequent substIdInfo will restore its IdInfo] +-- Augment the subtitution +-- if the unique changed, *or* +-- if there's interesting occurrence info + simplLetId subst@(Subst in_scope env) old_id = (Subst (in_scope `extendInScopeSet` new_id) new_env, new_id) where @@ -590,7 +591,7 @@ simplIdInfo subst old_info bndr \begin{code} -- substBndr and friends are used when doing expression substitution only --- In this case we can preserve occurrence information, and indeed we want +-- In this case we can *preserve* occurrence information, and indeed we *want* -- to do so else lose useful occ info in rules. Hence the calls to -- simpl_id with keepOccInfo diff --git a/ghc/compiler/stranal/StrictAnal.lhs b/ghc/compiler/stranal/StrictAnal.lhs index aeb1c3fe50..bac6b14ac8 100644 --- a/ghc/compiler/stranal/StrictAnal.lhs +++ b/ghc/compiler/stranal/StrictAnal.lhs @@ -11,7 +11,7 @@ module StrictAnal ( saBinds ) where #include "HsVersions.h" -import CmdLineOpts ( DynFlags, DynFlag(..), dopt ) +import CmdLineOpts ( DynFlags, DynFlag(..) ) import CoreSyn import Id ( setIdStrictness, setInlinePragma, idDemandInfo, setIdDemandInfo, isBottomingId, |