Add PrimCall to the STG layer and update Core -> STG translation
[ghc-hetmet.git] / compiler / stgSyn / StgSyn.lhs
index 6c38ecd..973514c 100644 (file)
@@ -44,10 +44,11 @@ module StgSyn (
 #endif
     ) where
 
+#include "HsVersions.h"
+
 import CostCentre      ( CostCentreStack, CostCentre )
 import VarSet          ( IdSet, isEmptyVarSet )
-import Var             ( isId )
-import Id              ( Id, idName, idType, idCafInfo )
+import Id              ( Id, idName, idType, idCafInfo, isId )
 import IdInfo          ( mayHaveCafRefs )
 import Packages                ( isDllName )
 import Literal         ( Literal, literalType )
@@ -55,7 +56,7 @@ import ForeignCall    ( ForeignCall )
 import DataCon         ( DataCon, dataConName )
 import CoreSyn         ( AltCon )
 import PprCore         ( {- instances -} )
-import PrimOp          ( PrimOp )
+import PrimOp          ( PrimOp, PrimCall )
 import Outputable
 import Type             ( Type )
 import TyCon            ( TyCon )
@@ -556,6 +557,8 @@ in StgOpApp and COpStmt.
 \begin{code}
 data StgOp = StgPrimOp  PrimOp
 
+           | StgPrimCallOp PrimCall
+
           | StgFCallOp ForeignCall Unique
                -- The Unique is occasionally needed by the C pretty-printer
                -- (which lacks a unique supply), notably when generating a
@@ -764,6 +767,7 @@ pprStgAlt (con, params, _use_mask, expr)
 
 pprStgOp :: StgOp -> SDoc
 pprStgOp (StgPrimOp  op)   = ppr op
+pprStgOp (StgPrimCallOp op)= ppr op
 pprStgOp (StgFCallOp op _) = ppr op
 
 instance Outputable AltType where