[commit: ghc] wip/nfs-locking: Fix separation into full and RTS-only ways, add comments. (799b809)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:50:22 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/799b8090941e4c0e9c601890a480511052e36f8f/ghc
>---------------------------------------------------------------
commit 799b8090941e4c0e9c601890a480511052e36f8f
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Tue Feb 16 00:31:32 2016 +0000
Fix separation into full and RTS-only ways, add comments.
>---------------------------------------------------------------
799b8090941e4c0e9c601890a480511052e36f8f
src/Way.hs | 42 ++++++++++++++++++++++++------------------
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/src/Way.hs b/src/Way.hs
index 6d034e9..01b18d2 100644
--- a/src/Way.hs
+++ b/src/Way.hs
@@ -76,7 +76,7 @@ instance Read Way where
instance Eq Way where
Way a == Way b = a == b
--- | Build with no 'WayUnit's at all.
+-- | Build default _vanilla_ way.
vanilla :: Way
vanilla = wayFromUnits []
@@ -84,33 +84,39 @@ vanilla = wayFromUnits []
profiling :: Way
profiling = wayFromUnits [Profiling]
--- | Build with logging.
+-- | Build with dynamic linking.
+dynamic :: Way
+dynamic = wayFromUnits [Dynamic]
+
+-- RTS only ways. See compiler/main/DynFlags.hs.
+-- | Build RTS with event logging.
logging :: Way
logging = wayFromUnits [Logging]
--- RTS only ways
--- TODO: do we need to define *only* these? Shall we generalise/simplify?
--- See compiler/main/DynFlags.hs.
-threaded, threadedProfiling, threadedLogging, debug, debugProfiling,
- threadedDebug, threadedDebugProfiling, dynamic, profilingDynamic,
- threadedProfilingDynamic, threadedDynamic, threadedDebugDynamic,
- debugDynamic, loggingDynamic, threadedLoggingDynamic :: Way
+-- | Build multithreaded RTS.
+threaded :: Way
+threaded = wayFromUnits [Threaded]
+
+-- | Build RTS with debug information.
+debug :: Way
+debug = wayFromUnits [Debug]
-threaded = wayFromUnits [Threaded]
+threadedDebug, threadedProfiling, threadedLogging, threadedDynamic,
+ threadedDebugProfiling, threadedDebugDynamic, threadedProfilingDynamic,
+ threadedLoggingDynamic, debugProfiling, debugDynamic, profilingDynamic,
+ loggingDynamic :: Way
+threadedDebug = wayFromUnits [Threaded, Debug]
threadedProfiling = wayFromUnits [Threaded, Profiling]
threadedLogging = wayFromUnits [Threaded, Logging]
-debug = wayFromUnits [Debug]
-debugProfiling = wayFromUnits [Debug, Profiling]
-threadedDebug = wayFromUnits [Threaded, Debug]
-threadedDebugProfiling = wayFromUnits [Threaded, Debug, Profiling]
-dynamic = wayFromUnits [Dynamic]
-profilingDynamic = wayFromUnits [Profiling, Dynamic]
-threadedProfilingDynamic = wayFromUnits [Threaded, Profiling, Dynamic]
threadedDynamic = wayFromUnits [Threaded, Dynamic]
+threadedDebugProfiling = wayFromUnits [Threaded, Debug, Profiling]
threadedDebugDynamic = wayFromUnits [Threaded, Debug, Dynamic]
+threadedProfilingDynamic = wayFromUnits [Threaded, Profiling, Dynamic]
+threadedLoggingDynamic = wayFromUnits [Threaded, Logging, Dynamic]
+debugProfiling = wayFromUnits [Debug, Profiling]
debugDynamic = wayFromUnits [Debug, Dynamic]
+profilingDynamic = wayFromUnits [Profiling, Dynamic]
loggingDynamic = wayFromUnits [Logging, Dynamic]
-threadedLoggingDynamic = wayFromUnits [Threaded, Logging, Dynamic]
wayPrefix :: Way -> String
wayPrefix way | way == vanilla = ""
More information about the ghc-commits
mailing list