Add {-# OPTIONS_GHC -w #-} and some blurb to all compiler modules
[ghc-hetmet.git] / compiler / prelude / PrimOp.lhs
index a650352..136dace 100644 (file)
@@ -4,11 +4,20 @@
 \section[PrimOp]{Primitive operations (machine-level)}
 
 \begin{code}
+{-# OPTIONS_GHC -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/WorkingConventions#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@}