X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fprelude%2FPrimOp.lhs;h=136dacedb56b4b7208d4c1f0720ff54b78a043f1;hp=a65035228096c09f8408f3a2c8fe8fa8a688547b;hb=17b297d97d327620ed6bfab942f8992b2446f1bf;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1 diff --git a/compiler/prelude/PrimOp.lhs b/compiler/prelude/PrimOp.lhs index a650352..136dace 100644 --- a/compiler/prelude/PrimOp.lhs +++ b/compiler/prelude/PrimOp.lhs @@ -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@}