summaryrefslogtreecommitdiff
path: root/libraries/base/GHC/RTS/Flags.hsc
diff options
context:
space:
mode:
authorRyanGlScott <ryan.gl.scott@gmail.com>2015-07-07 21:20:07 +0200
committerBen Gamari <ben@smart-cactus.org>2015-07-07 21:20:46 +0200
commit1967a52df5bea5539e46393fa0da0a1ebd6d9db8 (patch)
tree463adf2b38e69f9e228619cc6761fa573212aaee /libraries/base/GHC/RTS/Flags.hsc
parent00c8d4d551472940303437be1496bf23b882273b (diff)
downloadhaskell-1967a52df5bea5539e46393fa0da0a1ebd6d9db8.tar.gz
Export more types from GHC.RTS.Flags (#9970)
Export the data types `GiveGCStats`, `DoCostCentres`, `DoHeapProfiles`, and `DoTrace`, as well as the type synonyms `Time` and `RtsNat`. The above data types appear as fields in the `-Stats` data types in `GHC.RTS.Flags`, but since they only have `Show` instances, it is practically impossible to due anything useful with the above types unless they are exported. Reviewers: hvr, ekmett, austin, ezyang, bgamari Reviewed By: bgamari Subscribers: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1030 GHC Trac Issues: #9970
Diffstat (limited to 'libraries/base/GHC/RTS/Flags.hsc')
-rw-r--r--libraries/base/GHC/RTS/Flags.hsc20
1 files changed, 13 insertions, 7 deletions
diff --git a/libraries/base/GHC/RTS/Flags.hsc b/libraries/base/GHC/RTS/Flags.hsc
index 308aafbf91..d2afcab4db 100644
--- a/libraries/base/GHC/RTS/Flags.hsc
+++ b/libraries/base/GHC/RTS/Flags.hsc
@@ -9,13 +9,19 @@
-- @since 4.8.0.0
--
module GHC.RTS.Flags
- ( RTSFlags (..)
+ ( RtsTime
+ , RtsNat
+ , RTSFlags (..)
+ , GiveGCStats (..)
, GCFlags (..)
, ConcFlags (..)
, MiscFlags (..)
, DebugFlags (..)
+ , DoCostCentres (..)
, CCFlags (..)
+ , DoHeapProfile (..)
, ProfFlags (..)
+ , DoTrace (..)
, TraceFlags (..)
, TickyFlags (..)
, getRTSFlags
@@ -48,7 +54,7 @@ import GHC.Show
import GHC.Word
-- | @'Time'@ is defined as a @'StgWord64'@ in @stg/Types.h@
-type Time = Word64
+type RtsTime = Word64
-- | @'nat'@ defined in @rts/Types.h@
type RtsNat = #{type unsigned int}
@@ -98,19 +104,19 @@ data GCFlags = GCFlags
-- ^ use "mostly mark-sweep" instead of copying for the oldest generation
, ringBell :: Bool
, frontpanel :: Bool
- , idleGCDelayTime :: Time
+ , idleGCDelayTime :: RtsTime
, doIdleGC :: Bool
, heapBase :: Word -- ^ address to ask the OS for memory
, allocLimitGrace :: Word
} deriving (Show)
data ConcFlags = ConcFlags
- { ctxtSwitchTime :: Time
+ { ctxtSwitchTime :: RtsTime
, ctxtSwitchTicks :: Int
} deriving (Show)
data MiscFlags = MiscFlags
- { tickInterval :: Time
+ { tickInterval :: RtsTime
, installSignalHandlers :: Bool
, machineReadable :: Bool
, linkerMemBase :: Word
@@ -198,8 +204,8 @@ instance Enum DoHeapProfile where
data ProfFlags = ProfFlags
{ doHeapProfile :: DoHeapProfile
- , heapProfileInterval :: Time -- ^ time between samples
- , heapProfileIntervalTicks :: Word -- ^ ticks between samples (derived)
+ , heapProfileInterval :: RtsTime -- ^ time between samples
+ , heapProfileIntervalTicks :: Word -- ^ ticks between samples (derived)
, includeTSOs :: Bool
, showCCSOnException :: Bool
, maxRetainerSetSize :: Word