[project @ 2001-02-26 15:42:24 by simonpj]
[ghc-hetmet.git] / ghc / compiler / coreSyn / CoreSyn.lhs
index 6a574c4..b78bbcf 100644 (file)
@@ -15,7 +15,7 @@ module CoreSyn (
        mkConApp, 
        varToCoreExpr,
 
-       isTyVar, isId, isLocalVar, mustHaveLocalBinding,
+       isTyVar, isId, 
        bindersOf, bindersOfBinds, rhssOfBind, rhssOfAlts, 
        collectBinders, collectTyBinders, collectValBinders, collectTyAndValBinders,
        collectArgs, collectBindersIgnoringNotes,
@@ -35,7 +35,8 @@ module CoreSyn (
        seqRules, seqExpr, seqExprs, seqUnfolding,
 
        -- Annotated expressions
-       AnnExpr, AnnExpr'(..), AnnBind(..), AnnAlt, deAnnotate, deAnnotate',
+       AnnExpr, AnnExpr'(..), AnnBind(..), AnnAlt, 
+       deAnnotate, deAnnotate', deAnnAlt,
 
        -- Core rules
        CoreRules(..),  -- Representation needed by friends
@@ -109,29 +110,6 @@ data Note
 
 %************************************************************************
 %*                                                                     *
-\subsection{isLocalVar}
-%*                                                                     *
-%************************************************************************
-
-@isLocalVar@ returns True of all TyVars, and of Ids that are defined in 
-this module and are not constants like data constructors and record selectors.
-These are the variables that we need to pay attention to when finding free
-variables, or doing dependency analysis.
-
-\begin{code}
-isLocalVar :: Var -> Bool
-isLocalVar v = isTyVar v || isLocalId v
-\end{code}
-
-\begin{code}
-mustHaveLocalBinding :: Var -> Bool
--- True <=> the variable must have a binding in this module
-mustHaveLocalBinding v = isTyVar v || (isLocalId v && not (hasNoBinding v))
-\end{code}
-
-
-%************************************************************************
-%*                                                                     *
 \subsection{Transformation rules}
 %*                                                                     *
 %************************************************************************
@@ -478,6 +456,7 @@ coreExprCc other               = noCostCentre
 \end{code}
 
 
+
 %************************************************************************
 %*                                                                     *
 \subsection{Predicates}
@@ -595,7 +574,8 @@ deAnnotate' (AnnLet bind body)
 
 deAnnotate' (AnnCase scrut v alts)
   = Case (deAnnotate scrut) v (map deAnnAlt alts)
-  where
-    deAnnAlt (con,args,rhs) = (con,args,deAnnotate rhs)
+
+deAnnAlt :: AnnAlt bndr annot -> Alt bndr
+deAnnAlt (con,args,rhs) = (con,args,deAnnotate rhs)
 \end{code}