Commit 5ee7f0e6 authored by benl@ouroborus.net's avatar benl@ouroborus.net

Implement -dsuppress-module-prefixes

parent 3ebd8897
...@@ -451,6 +451,9 @@ pprModulePrefix :: PprStyle -> Module -> OccName -> SDoc ...@@ -451,6 +451,9 @@ pprModulePrefix :: PprStyle -> Module -> OccName -> SDoc
-- Print the "M." part of a name, based on whether it's in scope or not -- Print the "M." part of a name, based on whether it's in scope or not
-- See Note [Printing original names] in HscTypes -- See Note [Printing original names] in HscTypes
pprModulePrefix sty mod occ pprModulePrefix sty mod occ
| opt_SuppressModulePrefixes = empty
| otherwise
= case qualName sty mod occ of -- See Outputable.QualifyName: = case qualName sty mod occ of -- See Outputable.QualifyName:
NameQual modname -> ppr modname <> dot -- Name is in scope NameQual modname -> ppr modname <> dot -- Name is in scope
NameNotInScope1 -> ppr mod <> dot -- Not in scope NameNotInScope1 -> ppr mod <> dot -- Not in scope
......
...@@ -121,13 +121,14 @@ static_flags = [ ...@@ -121,13 +121,14 @@ static_flags = [
-- is required to get the RTS ticky support. -- is required to get the RTS ticky support.
------ Debugging ---------------------------------------------------- ------ Debugging ----------------------------------------------------
, Flag "dppr-debug" (PassFlag addOpt) , Flag "dppr-debug" (PassFlag addOpt)
, Flag "dsuppress-uniques" (PassFlag addOpt) , Flag "dsuppress-uniques" (PassFlag addOpt)
, Flag "dsuppress-coercions" (PassFlag addOpt) , Flag "dsuppress-coercions" (PassFlag addOpt)
, Flag "dppr-user-length" (AnySuffix addOpt) , Flag "dsuppress-module-prefixes" (PassFlag addOpt)
, Flag "dopt-fuel" (AnySuffix addOpt) , Flag "dppr-user-length" (AnySuffix addOpt)
, Flag "dno-debug-output" (PassFlag addOpt) , Flag "dopt-fuel" (AnySuffix addOpt)
, Flag "dstub-dead-values" (PassFlag addOpt) , Flag "dno-debug-output" (PassFlag addOpt)
, Flag "dstub-dead-values" (PassFlag addOpt)
-- rest of the debugging flags are dynamic -- rest of the debugging flags are dynamic
----- Linker -------------------------------------------------------- ----- Linker --------------------------------------------------------
......
...@@ -23,6 +23,7 @@ module StaticFlags ( ...@@ -23,6 +23,7 @@ module StaticFlags (
opt_PprUserLength, opt_PprUserLength,
opt_SuppressUniques, opt_SuppressUniques,
opt_SuppressCoercions, opt_SuppressCoercions,
opt_SuppressModulePrefixes,
opt_PprStyle_Debug, opt_PprStyle_Debug,
opt_NoDebugOutput, opt_NoDebugOutput,
...@@ -188,6 +189,9 @@ opt_SuppressUniques = lookUp (fsLit "-dsuppress-uniques") ...@@ -188,6 +189,9 @@ opt_SuppressUniques = lookUp (fsLit "-dsuppress-uniques")
opt_SuppressCoercions :: Bool opt_SuppressCoercions :: Bool
opt_SuppressCoercions = lookUp (fsLit "-dsuppress-coercions") opt_SuppressCoercions = lookUp (fsLit "-dsuppress-coercions")
opt_SuppressModulePrefixes :: Bool
opt_SuppressModulePrefixes = lookUp (fsLit "-dsuppress-module-prefixes")
opt_PprStyle_Debug :: Bool opt_PprStyle_Debug :: Bool
opt_PprStyle_Debug = lookUp (fsLit "-dppr-debug") opt_PprStyle_Debug = lookUp (fsLit "-dppr-debug")
...@@ -212,8 +216,10 @@ opt_Hpc = lookUp (fsLit "-fhpc") ...@@ -212,8 +216,10 @@ opt_Hpc = lookUp (fsLit "-fhpc")
-- language opts -- language opts
opt_DictsStrict :: Bool opt_DictsStrict :: Bool
opt_DictsStrict = lookUp (fsLit "-fdicts-strict") opt_DictsStrict = lookUp (fsLit "-fdicts-strict")
opt_IrrefutableTuples :: Bool opt_IrrefutableTuples :: Bool
opt_IrrefutableTuples = lookUp (fsLit "-firrefutable-tuples") opt_IrrefutableTuples = lookUp (fsLit "-firrefutable-tuples")
opt_Parallel :: Bool opt_Parallel :: Bool
opt_Parallel = lookUp (fsLit "-fparallel") opt_Parallel = lookUp (fsLit "-fparallel")
...@@ -236,12 +242,16 @@ opt_MaxWorkerArgs = lookup_def_int "-fmax-worker-args" (10::Int) ...@@ -236,12 +242,16 @@ opt_MaxWorkerArgs = lookup_def_int "-fmax-worker-args" (10::Int)
opt_GranMacros :: Bool opt_GranMacros :: Bool
opt_GranMacros = lookUp (fsLit "-fgransim") opt_GranMacros = lookUp (fsLit "-fgransim")
opt_HiVersion :: Integer opt_HiVersion :: Integer
opt_HiVersion = read (cProjectVersionInt ++ cProjectPatchLevel) :: Integer opt_HiVersion = read (cProjectVersionInt ++ cProjectPatchLevel) :: Integer
opt_HistorySize :: Int opt_HistorySize :: Int
opt_HistorySize = lookup_def_int "-fhistory-size" 20 opt_HistorySize = lookup_def_int "-fhistory-size" 20
opt_OmitBlackHoling :: Bool opt_OmitBlackHoling :: Bool
opt_OmitBlackHoling = lookUp (fsLit "-dno-black-holing") opt_OmitBlackHoling = lookUp (fsLit "-dno-black-holing")
opt_StubDeadValues :: Bool opt_StubDeadValues :: Bool
opt_StubDeadValues = lookUp (fsLit "-dstub-dead-values") opt_StubDeadValues = lookUp (fsLit "-dstub-dead-values")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment