{-# LINE 1 "libraries/ghc-internal/src/GHC/Internal/RTS/Flags/Test.hsc" #-}
{-# LANGUAGE NoImplicitPrelude #-}
module GHC.Internal.RTS.Flags.Test
( getUserEventTracingEnabled
)
where
import GHC.Internal.Base
{-# LINE 13 "libraries/ghc-internal/src/GHC/Internal/RTS/Flags/Test.hsc" #-}
import GHC.Internal.Ptr
import GHC.Internal.Foreign.C.Types
import GHC.Internal.Foreign.Marshal.Utils
import GHC.Internal.Foreign.Storable
import GHC.Internal.Data.Functor ((<$>))
foreign import ccall "&RtsFlags" rtsFlagsPtr :: Ptr ()
{-# LINE 25 "libraries/ghc-internal/src/GHC/Internal/RTS/Flags/Test.hsc" #-}
getUserEventTracingEnabled :: IO Bool
getUserEventTracingEnabled :: IO Bool
getUserEventTracingEnabled = do
{-# LINE 34 "libraries/ghc-internal/src/GHC/Internal/RTS/Flags/Test.hsc" #-}
let ptr :: Ptr b
ptr = ((\Ptr ()
hsc_ptr -> Ptr ()
hsc_ptr Ptr () -> Int -> Ptr b
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
384)) Ptr ()
rtsFlagsPtr
{-# LINE 35 "libraries/ghc-internal/src/GHC/Internal/RTS/Flags/Test.hsc" #-}
toBool <$> ((\hsc_ptr -> peekByteOff hsc_ptr 11) ptr :: IO CBool)
{-# LINE 36 "libraries/ghc-internal/src/GHC/Internal/RTS/Flags/Test.hsc" #-}
{-# LINE 37 "libraries/ghc-internal/src/GHC/Internal/RTS/Flags/Test.hsc" #-}