X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fprelude%2FPrimOp.lhs;h=8c532ffc869157e6503cf66f1211d05b0a810664;hb=83d563cb9ede0ba792836e529b1e2929db926355;hp=6338941662520431a85142045ab1e300da32c2dc;hpb=8a3ed3364fbc74b1f1b87b049737da2b251f92df;p=ghc-hetmet.git diff --git a/compiler/prelude/PrimOp.lhs b/compiler/prelude/PrimOp.lhs index 6338941..8c532ff 100644 --- a/compiler/prelude/PrimOp.lhs +++ b/compiler/prelude/PrimOp.lhs @@ -21,7 +21,9 @@ module PrimOp ( primOpOutOfLine, primOpNeedsWrapper, primOpOkForSpeculation, primOpIsCheap, primOpIsDupable, - getPrimOpResultInfo, PrimOpResultInfo(..) + getPrimOpResultInfo, PrimOpResultInfo(..), + + PrimCall(..) ) where #include "HsVersions.h" @@ -29,17 +31,19 @@ module PrimOp ( import TysPrim import TysWiredIn -import NewDemand +import Demand import Var ( TyVar ) import OccName ( OccName, pprOccName, mkVarOccFS ) import TyCon ( TyCon, isPrimTyCon, tyConPrimRep, PrimRep(..) ) import Type ( Type, mkForAllTys, mkFunTy, mkFunTys, tyConAppTyCon, typePrimRep ) import BasicTypes ( Arity, Boxity(..) ) +import ForeignCall ( CLabelString ) import Unique ( Unique, mkPrimOpIdUnique ) import Outputable import FastTypes import FastString +import Module ( PackageId ) \end{code} %************************************************************************ @@ -506,3 +510,18 @@ pprPrimOp :: PrimOp -> SDoc pprPrimOp other_op = pprOccName (primOpOcc other_op) \end{code} + +%************************************************************************ +%* * +\subsubsection[PrimCall]{User-imported primitive calls} +%* * +%************************************************************************ + +\begin{code} +data PrimCall = PrimCall CLabelString PackageId + +instance Outputable PrimCall where + ppr (PrimCall lbl pkgId) + = text "__primcall" <+> ppr pkgId <+> ppr lbl + +\end{code}