1 {-# GHC_PRAGMA INTERFACE VERSION 5 #-}
2 interface FreeVars where
3 import AnnCoreSyn(AnnCoreBinding, AnnCoreCaseAlternatives, AnnCoreCaseDefault, AnnCoreExpr', AnnCoreExpr(..))
4 import BasicLit(BasicLit)
5 import CoreSyn(CoreAtom, CoreBinding, CoreCaseAlternatives, CoreExpr)
6 import CostCentre(CostCentre)
10 import UniType(UniType)
12 import UniqSet(IdSet(..), TyVarSet(..), UniqSet(..))
13 data AnnCoreBinding a b c
14 data AnnCoreCaseAlternatives a b c
15 data AnnCoreCaseDefault a b c
16 type AnnCoreExpr a b c = (c, AnnCoreExpr' a b c)
17 data AnnCoreExpr' a b c
19 type CoreExprWithFVs = (FVInfo, AnnCoreExpr' Id Id FVInfo)
20 type FVCoreBinding = CoreBinding (Id, UniqFM Id) Id
21 type FVCoreExpr = CoreExpr (Id, UniqFM Id) Id
22 data FVInfo = FVInfo (UniqFM Id) (UniqFM TyVar) LeakInfo
25 type IdSet = UniqFM Id
26 data LeakInfo = MightLeak | LeakFree Int
27 type TyVarSet = UniqFM TyVar
28 type UniqSet a = UniqFM a
29 addTopBindsFVs :: (UniqFM Id -> Id -> Bool) -> [CoreBinding Id Id] -> ([CoreBinding (Id, UniqFM Id) Id], UniqFM Id)
30 freeTyVarsOf :: (FVInfo, AnnCoreExpr' Id Id FVInfo) -> UniqFM TyVar
31 freeVars :: CoreExpr Id Id -> (FVInfo, AnnCoreExpr' Id Id FVInfo)
32 freeVarsOf :: (FVInfo, AnnCoreExpr' Id Id FVInfo) -> UniqFM Id