X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FExts.hs;h=ea4b8ff2a8933a8c5e0a9ebc5a81099f93ba05ec;hb=85ed71ab833a40f5acfeb4610a0aa3c3c3e1a35b;hp=5a87974b473876ad88cf18680ff3a744aac2abfb;hpb=389cd8738c0b402ebce69e7a7c2f0cc0eee2300e;p=ghc-base.git diff --git a/GHC/Exts.hs b/GHC/Exts.hs index 5a87974..ea4b8ff 100644 --- a/GHC/Exts.hs +++ b/GHC/Exts.hs @@ -44,7 +44,10 @@ module GHC.Exts Down(..), groupWith, sortWith, the, -- * Event logging - traceEvent + traceEvent, + + -- * SpecConstr annotations + SpecConstrAnnotation(..) ) where @@ -52,6 +55,7 @@ import Prelude import GHC.Prim import GHC.Base +import GHC.Magic import GHC.Word import GHC.Int -- import GHC.Float @@ -59,6 +63,7 @@ import GHC.Ptr import Data.String import Data.List import Foreign.C +import Data.Data -- XXX This should really be in Data.Tuple, where the definitions are maxTupleSize :: Int @@ -109,3 +114,22 @@ traceEvent :: String -> IO () traceEvent msg = do withCString msg $ \(Ptr p) -> IO $ \s -> case traceEvent# p s of s' -> (# s', () #) + + + +{- ********************************************************************** +* * +* SpecConstr annotation * +* * +********************************************************************** -} + +-- Annotating a type with NoSpecConstr will make SpecConstr +-- not specialise for arguments of that type. + +-- This data type is defined here, rather than in the SpecConstr module +-- itself, so that importing it doesn't force stupidly linking the +-- entire ghc package at runtime + +data SpecConstrAnnotation = NoSpecConstr | ForceSpecConstr + deriving( Data, Typeable, Eq ) +