projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
give a more useful message when the static flags have not been initialised (#1938)
[ghc-hetmet.git]
/
compiler
/
main
/
StaticFlags.hs
diff --git
a/compiler/main/StaticFlags.hs
b/compiler/main/StaticFlags.hs
index
43f630c
..
31b9414
100644
(file)
--- a/
compiler/main/StaticFlags.hs
+++ b/
compiler/main/StaticFlags.hs
@@
-26,6
+26,7
@@
module StaticFlags (
-- Output style options
opt_PprUserLength,
-- Output style options
opt_PprUserLength,
+ opt_SuppressUniques,
opt_PprStyle_Debug,
-- profiling opts
opt_PprStyle_Debug,
-- profiling opts
@@
-169,8
+170,9
@@
static_flags = [
-- ToDo: user ways
------ Debugging ----------------------------------------------------
-- ToDo: user ways
------ Debugging ----------------------------------------------------
- , ( "dppr-debug", PassFlag addOpt )
- , ( "dppr-user-length", AnySuffix addOpt )
+ , ( "dppr-debug", PassFlag addOpt )
+ , ( "dsuppress-uniques", PassFlag addOpt )
+ , ( "dppr-user-length", AnySuffix addOpt )
-- rest of the debugging flags are dynamic
--------- Profiling --------------------------------------------------
-- rest of the debugging flags are dynamic
--------- Profiling --------------------------------------------------
@@
-224,7
+226,7
@@
GLOBAL_VAR(v_opt_C_ready, False, Bool)
staticFlags = unsafePerformIO $ do
ready <- readIORef v_opt_C_ready
if (not ready)
staticFlags = unsafePerformIO $ do
ready <- readIORef v_opt_C_ready
if (not ready)
- then panic "a static opt was looked at too early!"
+ then panic "Static flags have not been initialised!\n Please call GHC.newSession or GHC.parseStaticFlags early enough."
else readIORef v_opt_C
-- -static is the default
else readIORef v_opt_C
-- -static is the default
@@
-282,6
+284,7
@@
unpacked_opts =
opt_IgnoreDotGhci = lookUp FSLIT("-ignore-dot-ghci")
-- debugging opts
opt_IgnoreDotGhci = lookUp FSLIT("-ignore-dot-ghci")
-- debugging opts
+opt_SuppressUniques = lookUp FSLIT("-dsuppress-uniques")
opt_PprStyle_Debug = lookUp FSLIT("-dppr-debug")
opt_PprUserLength = lookup_def_int "-dppr-user-length" 5 --ToDo: give this a name
opt_PprStyle_Debug = lookUp FSLIT("-dppr-debug")
opt_PprUserLength = lookup_def_int "-dppr-user-length" 5 --ToDo: give this a name