2aace5e401909f2a088ae00dcc3fe1c483614e1d
[ghc-hetmet.git] / ghc / compiler / stgSyn / CoreToStg.hi
1 {-# GHC_PRAGMA INTERFACE VERSION 5 #-}
2 interface CoreToStg where
3 import BasicLit(BasicLit)
4 import CoreSyn(CoreAtom, CoreBinding, CoreCaseAlternatives, CoreExpr)
5 import CostCentre(CostCentre)
6 import Id(Id, IdDetails)
7 import IdInfo(IdInfo)
8 import PrimOps(PrimOp)
9 import SplitUniq(SplitUniqSupply)
10 import StgSyn(StgAtom, StgBinderInfo, StgBinding, StgExpr, StgRhs, UpdateFlag)
11 import TyVar(TyVar)
12 import UniType(UniType)
13 import Unique(Unique)
14 data CoreBinding a b    {-# GHC_PRAGMA CoNonRec a (CoreExpr a b) | CoRec [(a, CoreExpr a b)] #-}
15 data CoreExpr a b       {-# GHC_PRAGMA CoVar b | CoLit BasicLit | CoCon Id [UniType] [CoreAtom b] | CoPrim PrimOp [UniType] [CoreAtom b] | CoLam [a] (CoreExpr a b) | CoTyLam TyVar (CoreExpr a b) | CoApp (CoreExpr a b) (CoreAtom b) | CoTyApp (CoreExpr a b) UniType | CoCase (CoreExpr a b) (CoreCaseAlternatives a b) | CoLet (CoreBinding a b) (CoreExpr a b) | CoSCC CostCentre (CoreExpr a b) #-}
16 data Id         {-# GHC_PRAGMA Id Unique UniType IdInfo IdDetails #-}
17 data SplitUniqSupply    {-# GHC_PRAGMA MkSplitUniqSupply Int SplitUniqSupply SplitUniqSupply #-}
18 data StgBinderInfo      {-# GHC_PRAGMA NoStgBinderInfo | StgBinderInfo Bool Bool Bool Bool Bool #-}
19 data StgBinding a b     {-# GHC_PRAGMA StgNonRec a (StgRhs a b) | StgRec [(a, StgRhs a b)] #-}
20 data StgRhs a b         {-# GHC_PRAGMA StgRhsClosure CostCentre StgBinderInfo [b] UpdateFlag [a] (StgExpr a b) | StgRhsCon CostCentre Id [StgAtom b] #-}
21 topCoreBindsToStg :: SplitUniqSupply -> [CoreBinding Id Id] -> [StgBinding Id Id]
22         {-# GHC_PRAGMA _A_ 2 _U_ 11 _N_ _S_ "U(ALA)S" {_A_ 2 _U_ 11 _N_ _N_ _N_ _N_} _N_ _N_ #-}
23