[commit: ghc] ghc-7.10: Export more types from GHC.RTS.Flags (#9970) (3d72709)

git at git.haskell.org git at git.haskell.org
Tue Sep 29 16:09:29 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/3d727092837cd7556865213a78285836467125a1/ghc

>---------------------------------------------------------------

commit 3d727092837cd7556865213a78285836467125a1
Author: RyanGlScott <ryan.gl.scott at gmail.com>
Date:   Tue Jul 7 21:20:07 2015 +0200

    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


>---------------------------------------------------------------

3d727092837cd7556865213a78285836467125a1
 libraries/base/GHC/RTS/Flags.hsc | 20 +++++++++++++-------
 libraries/base/changelog.md      |  7 +++++++
 2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/libraries/base/GHC/RTS/Flags.hsc b/libraries/base/GHC/RTS/Flags.hsc
index 16764e5..b8b2973 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 Nat = #{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
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md
index 8882c5a..4297b0a 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -1,5 +1,12 @@
 # Changelog for [`base` package](http://hackage.haskell.org/package/base)
 
+## 4.8.2.0  *Oct 2015*
+
+  * Bundled with GHC 7.10.3
+
+  * Exported `GiveGCStats`, `DoCostCentres`, `DoHeapProfile`, `DoTrace`,
+    `RtsTime`, and `RtsNat` from `GHC.RTS.Flags`
+
 ## 4.8.1.0  *Jul 2015*
 
   * Bundled with GHC 7.10.2



More information about the ghc-commits mailing list