\section{Update Avoidance Analyser} -*-haskell-literate-*-
(c) Simon Marlow, Andre Santos 1992-1993
-(c) The AQUA Project, Glasgow University, 1995
+(c) The AQUA Project, Glasgow University, 1995-1996
%-----------------------------------------------------------------------------
\subsection{Module Interface}
> module UpdAnal ( updateAnalyse ) where
>
-> import Type ( splitTyArgs, splitSigmaTy, Class, TyVarTemplate,
-> TauType(..)
-> )
-> import Id
-> import IdInfo
-> import Outputable ( isExported )
-> import Pretty
-> import SrcLoc ( mkUnknownSrcLoc )
+> IMP_Ubiq(){-uitous-}
+>
> import StgSyn
-> import UniqSet
-> import UniqSupply ( getBuiltinUniques )
-> import Util
+> import Util ( panic )
+>
+> updateAnalyse :: [StgBinding] -> [StgBinding] {- Exported -}
+> updateAnalyse = panic "UpdAnal.updateAnalyse"
+>
+> {- LATER: to end of file:
+> --import Type ( splitFunTy, splitSigmaTy, Class, TyVarTemplate,
+> -- SYN_IE(TauType)
+> -- )
+> --import Id
+> --import IdInfo
+> --import Pretty
+> --import SrcLoc ( mkUnknownSrcLoc )
+> --import StgSyn
+> --import UniqSet
+> --import Unique ( getBuiltinUniques )
+> --import Util
%-----------------------------------------------------------------------------
\subsection{Reverse application}
> (combine_IdEnvs (+) c' c, b', f')
>
> (_,dict_tys,tau_ty) = (splitSigmaTy . idType) v
-> (reg_arg_tys, _) = splitTyArgs tau_ty
+> (reg_arg_tys, _) = splitFunTy tau_ty
> arity = length dict_tys + length reg_arg_tys
removeSuperfluous2s = reverse . dropWhile (> 1) . reverse
> StgRec bs -> StgRec [ (attachOne v, rhs) | (v, rhs) <- bs ]
>
> where attachOne v
-> | isExported v
+> | externallyVisibleId v
> = let c = lookup v p in
> addIdUpdateInfo v
> (mkUpdateInfo (mkUpdateSpec v c))
> | otherwise = v
+> -}
%-----------------------------------------------------------------------------