X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fprelude%2FPrimOp.lhs;h=1b2b50f7a7b53ac913a0131c507125dc06d5e05b;hb=235edf36cc202bb21c00d0e5e05ebf076fb0542e;hp=a65035228096c09f8408f3a2c8fe8fa8a688547b;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/compiler/prelude/PrimOp.lhs b/compiler/prelude/PrimOp.lhs index a650352..1b2b50f 100644 --- a/compiler/prelude/PrimOp.lhs +++ b/compiler/prelude/PrimOp.lhs @@ -4,11 +4,20 @@ \section[PrimOp]{Primitive operations (machine-level)} \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module PrimOp ( PrimOp(..), allThePrimOps, primOpType, primOpSig, primOpTag, maxPrimOpTag, primOpOcc, + tagToEnumKey, + primOpOutOfLine, primOpNeedsWrapper, primOpOkForSpeculation, primOpIsCheap, primOpIsDupable, @@ -27,6 +36,7 @@ import TyCon ( TyCon, isPrimTyCon, tyConPrimRep, PrimRep(..) ) import Type ( Type, mkForAllTys, mkFunTy, mkFunTys, tyConAppTyCon, typePrimRep ) import BasicTypes ( Arity, Boxity(..) ) +import Unique ( Unique, mkPrimOpIdUnique ) import Outputable import FastTypes \end{code} @@ -84,6 +94,13 @@ allThePrimOps = #include "primop-list.hs-incl" \end{code} +\begin{code} +tagToEnumKey :: Unique +tagToEnumKey = mkPrimOpIdUnique (primOpTag TagToEnumOp) +\end{code} + + + %************************************************************************ %* * \subsection[PrimOp-info]{The essential info about each @PrimOp@}