[project @ 2002-02-06 15:54:23 by simonpj]
[ghc-hetmet.git] / ghc / compiler / coreSyn / Subst.lhs
index 07e3b0f..ce5d8bc 100644 (file)
@@ -45,7 +45,7 @@ import CoreSyn                ( Expr(..), Bind(..), Note(..), CoreExpr,
 import CoreFVs         ( exprFreeVars )
 import TypeRep         ( Type(..), TyNote(..) )  -- friend
 import Type            ( ThetaType, SourceType(..), PredType,
-                         tyVarsOfType, tyVarsOfTypes, mkAppTy, mkUTy, isUTy
+                         tyVarsOfType, tyVarsOfTypes, mkAppTy, 
                        )
 import VarSet
 import VarEnv
@@ -249,12 +249,10 @@ zapSubstEnv :: Subst -> Subst
 zapSubstEnv (Subst in_scope env) = Subst in_scope emptySubstEnv
 
 extendSubst :: Subst -> Var -> SubstResult -> Subst
-extendSubst (Subst in_scope env) v r = UASSERT( case r of { DoneTy ty -> not (isUTy ty) ; _ -> True } )
-                                       Subst in_scope (extendSubstEnv env v r)
+extendSubst (Subst in_scope env) v r = Subst in_scope (extendSubstEnv env v r)
 
 extendSubstList :: Subst -> [Var] -> [SubstResult] -> Subst
-extendSubstList (Subst in_scope env) v r = UASSERT( all (\ r1 -> case r1 of { DoneTy ty -> not (isUTy ty) ; _ -> True }) r )
-                                           Subst in_scope (extendSubstEnvList env v r)
+extendSubstList (Subst in_scope env) v r = Subst in_scope (extendSubstEnvList env v r)
 
 lookupSubst :: Subst -> Var -> Maybe SubstResult
 lookupSubst (Subst _ env) v = lookupSubstEnv env v
@@ -440,8 +438,6 @@ subst_ty subst ty
                                        
     go (ForAllTy tv ty)                   = case substTyVar subst tv of
                                        (subst', tv') -> ForAllTy tv' $! (subst_ty subst' ty)
-
-    go (UsageTy u ty)              = mkUTy (go u) $! (go ty)
 \end{code}
 
 Here is where we invent a new binder if necessary.
@@ -610,13 +606,13 @@ simplLetId subst@(Subst in_scope env) old_id
            | otherwise 
            = delSubstEnv env old_id
 
-simplIdInfo :: Subst -> IdInfo -> Id -> Id
+simplIdInfo :: Subst -> IdInfo -> IdInfo
   -- Used by the simplifier to compute new IdInfo for a let(rec) binder,
   -- subsequent to simplLetId having zapped its IdInfo
-simplIdInfo subst old_info bndr
+simplIdInfo subst old_info
   = case substIdInfo subst isFragileOcc old_info of 
-       Just new_info -> bndr `setIdInfo` new_info
-       Nothing       -> bndr `setIdInfo` old_info
+       Just new_info -> new_info
+       Nothing       -> old_info
 \end{code}
 
 \begin{code}