From: benl@ouroborus.net Date: Mon, 30 Aug 2010 03:24:28 +0000 (+0000) Subject: Implement -dsuppress-module-prefixes X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=5ee7f0e66649ef31c2fcb2528399b57eba5651db;p=ghc-hetmet.git Implement -dsuppress-module-prefixes --- diff --git a/compiler/basicTypes/Name.lhs b/compiler/basicTypes/Name.lhs index f0cb443..1a8b8b3 100644 --- a/compiler/basicTypes/Name.lhs +++ b/compiler/basicTypes/Name.lhs @@ -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 -- See Note [Printing original names] in HscTypes pprModulePrefix sty mod occ + | opt_SuppressModulePrefixes = empty + + | otherwise = case qualName sty mod occ of -- See Outputable.QualifyName: NameQual modname -> ppr modname <> dot -- Name is in scope NameNotInScope1 -> ppr mod <> dot -- Not in scope diff --git a/compiler/main/StaticFlagParser.hs b/compiler/main/StaticFlagParser.hs index 36a2fd1..143d81e 100644 --- a/compiler/main/StaticFlagParser.hs +++ b/compiler/main/StaticFlagParser.hs @@ -121,13 +121,14 @@ static_flags = [ -- is required to get the RTS ticky support. ------ Debugging ---------------------------------------------------- - , Flag "dppr-debug" (PassFlag addOpt) - , Flag "dsuppress-uniques" (PassFlag addOpt) - , Flag "dsuppress-coercions" (PassFlag addOpt) - , Flag "dppr-user-length" (AnySuffix addOpt) - , Flag "dopt-fuel" (AnySuffix addOpt) - , Flag "dno-debug-output" (PassFlag addOpt) - , Flag "dstub-dead-values" (PassFlag addOpt) + , Flag "dppr-debug" (PassFlag addOpt) + , Flag "dsuppress-uniques" (PassFlag addOpt) + , Flag "dsuppress-coercions" (PassFlag addOpt) + , Flag "dsuppress-module-prefixes" (PassFlag addOpt) + , Flag "dppr-user-length" (AnySuffix addOpt) + , Flag "dopt-fuel" (AnySuffix addOpt) + , Flag "dno-debug-output" (PassFlag addOpt) + , Flag "dstub-dead-values" (PassFlag addOpt) -- rest of the debugging flags are dynamic ----- Linker -------------------------------------------------------- diff --git a/compiler/main/StaticFlags.hs b/compiler/main/StaticFlags.hs index 95740c6..752c516 100644 --- a/compiler/main/StaticFlags.hs +++ b/compiler/main/StaticFlags.hs @@ -23,6 +23,7 @@ module StaticFlags ( opt_PprUserLength, opt_SuppressUniques, opt_SuppressCoercions, + opt_SuppressModulePrefixes, opt_PprStyle_Debug, opt_NoDebugOutput, @@ -188,6 +189,9 @@ opt_SuppressUniques = lookUp (fsLit "-dsuppress-uniques") opt_SuppressCoercions :: Bool opt_SuppressCoercions = lookUp (fsLit "-dsuppress-coercions") +opt_SuppressModulePrefixes :: Bool +opt_SuppressModulePrefixes = lookUp (fsLit "-dsuppress-module-prefixes") + opt_PprStyle_Debug :: Bool opt_PprStyle_Debug = lookUp (fsLit "-dppr-debug") @@ -212,8 +216,10 @@ opt_Hpc = lookUp (fsLit "-fhpc") -- language opts opt_DictsStrict :: Bool opt_DictsStrict = lookUp (fsLit "-fdicts-strict") + opt_IrrefutableTuples :: Bool opt_IrrefutableTuples = lookUp (fsLit "-firrefutable-tuples") + opt_Parallel :: Bool opt_Parallel = lookUp (fsLit "-fparallel") @@ -236,12 +242,16 @@ opt_MaxWorkerArgs = lookup_def_int "-fmax-worker-args" (10::Int) opt_GranMacros :: Bool opt_GranMacros = lookUp (fsLit "-fgransim") + opt_HiVersion :: Integer opt_HiVersion = read (cProjectVersionInt ++ cProjectPatchLevel) :: Integer + opt_HistorySize :: Int opt_HistorySize = lookup_def_int "-fhistory-size" 20 + opt_OmitBlackHoling :: Bool opt_OmitBlackHoling = lookUp (fsLit "-dno-black-holing") + opt_StubDeadValues :: Bool opt_StubDeadValues = lookUp (fsLit "-dstub-dead-values")