Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Tobias Decking
GHC
Commits
69a804e3
Commit
69a804e3
authored
Dec 08, 2010
by
benl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more suppression flags
-dsuppress-all -dsuppress-type-applications -dsuppress-idinfo
parent
10810bbd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
14 deletions
+54
-14
compiler/coreSyn/PprCore.lhs
compiler/coreSyn/PprCore.lhs
+8
-1
compiler/main/StaticFlagParser.hs
compiler/main/StaticFlagParser.hs
+12
-9
compiler/main/StaticFlags.hs
compiler/main/StaticFlags.hs
+34
-4
No files found.
compiler/coreSyn/PprCore.lhs
View file @
69a804e3
...
@@ -233,8 +233,13 @@ ppr_case_pat con args
...
@@ -233,8 +233,13 @@ ppr_case_pat con args
where
where
ppr_bndr = pprBndr CaseBind
ppr_bndr = pprBndr CaseBind
-- | Pretty print the argument in a function application.
pprArg :: OutputableBndr a => Expr a -> SDoc
pprArg :: OutputableBndr a => Expr a -> SDoc
pprArg (Type ty) = ptext (sLit "@") <+> pprParendType ty
pprArg (Type ty)
| opt_SuppressTypeApplications = empty
| otherwise = ptext (sLit "@") <+> pprParendType ty
pprArg expr = pprParendExpr expr
pprArg expr = pprParendExpr expr
\end{code}
\end{code}
...
@@ -325,6 +330,8 @@ pprIdBndrInfo info
...
@@ -325,6 +330,8 @@ pprIdBndrInfo info
\begin{code}
\begin{code}
ppIdInfo :: Id -> IdInfo -> SDoc
ppIdInfo :: Id -> IdInfo -> SDoc
ppIdInfo id info
ppIdInfo id info
| opt_SuppressIdInfo = empty
| otherwise
= showAttributes
= showAttributes
[ (True, pp_scope <> ppr (idDetails id))
[ (True, pp_scope <> ppr (idDetails id))
, (has_arity, ptext (sLit "Arity=") <> int arity)
, (has_arity, ptext (sLit "Arity=") <> int arity)
...
...
compiler/main/StaticFlagParser.hs
View file @
69a804e3
...
@@ -121,15 +121,18 @@ static_flags = [
...
@@ -121,15 +121,18 @@ 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-all"
(
PassFlag
addOpt
)
,
Flag
"dsuppress-coercions"
(
PassFlag
addOpt
)
,
Flag
"dsuppress-uniques"
(
PassFlag
addOpt
)
,
Flag
"dsuppress-module-prefixes"
(
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
"dsuppress-type-applications"
(
PassFlag
addOpt
)
,
Flag
"dtrace-level"
(
AnySuffix
addOpt
)
,
Flag
"dsuppress-idinfo"
(
PassFlag
addOpt
)
,
Flag
"dno-debug-output"
(
PassFlag
addOpt
)
,
Flag
"dppr-user-length"
(
AnySuffix
addOpt
)
,
Flag
"dstub-dead-values"
(
PassFlag
addOpt
)
,
Flag
"dopt-fuel"
(
AnySuffix
addOpt
)
,
Flag
"dtrace-level"
(
AnySuffix
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 --------------------------------------------------------
...
...
compiler/main/StaticFlags.hs
View file @
69a804e3
...
@@ -21,9 +21,12 @@ module StaticFlags (
...
@@ -21,9 +21,12 @@ module StaticFlags (
-- Output style options
-- Output style options
opt_PprUserLength
,
opt_PprUserLength
,
opt_SuppressAll
,
opt_SuppressUniques
,
opt_SuppressUniques
,
opt_SuppressCoercions
,
opt_SuppressCoercions
,
opt_SuppressModulePrefixes
,
opt_SuppressModulePrefixes
,
opt_SuppressTypeApplications
,
opt_SuppressIdInfo
,
opt_PprStyle_Debug
,
opt_TraceLevel
,
opt_PprStyle_Debug
,
opt_TraceLevel
,
opt_NoDebugOutput
,
opt_NoDebugOutput
,
...
@@ -181,15 +184,42 @@ unpacked_opts =
...
@@ -181,15 +184,42 @@ unpacked_opts =
opt_IgnoreDotGhci
::
Bool
opt_IgnoreDotGhci
::
Bool
opt_IgnoreDotGhci
=
lookUp
(
fsLit
"-ignore-dot-ghci"
)
opt_IgnoreDotGhci
=
lookUp
(
fsLit
"-ignore-dot-ghci"
)
-- debugging opts
-- debugging options
-- | Suppress all that is suppressable in core dumps.
opt_SuppressAll
::
Bool
opt_SuppressAll
=
lookUp
(
fsLit
"-dsuppress-all"
)
-- | Suppress unique ids on variables.
opt_SuppressUniques
::
Bool
opt_SuppressUniques
::
Bool
opt_SuppressUniques
=
lookUp
(
fsLit
"-dsuppress-uniques"
)
opt_SuppressUniques
=
lookUp
(
fsLit
"-dsuppress-all"
)
||
lookUp
(
fsLit
"-dsuppress-uniques"
)
-- | Suppress all coercions, them replacing with '...'
opt_SuppressCoercions
::
Bool
opt_SuppressCoercions
::
Bool
opt_SuppressCoercions
=
lookUp
(
fsLit
"-dsuppress-coercions"
)
opt_SuppressCoercions
=
lookUp
(
fsLit
"-dsuppress-all"
)
||
lookUp
(
fsLit
"-dsuppress-coercions"
)
-- | Suppress module id prefixes on variables.
opt_SuppressModulePrefixes
::
Bool
opt_SuppressModulePrefixes
::
Bool
opt_SuppressModulePrefixes
=
lookUp
(
fsLit
"-dsuppress-module-prefixes"
)
opt_SuppressModulePrefixes
=
lookUp
(
fsLit
"-dsuppress-all"
)
||
lookUp
(
fsLit
"-dsuppress-module-prefixes"
)
-- | Suppress type applications.
opt_SuppressTypeApplications
::
Bool
opt_SuppressTypeApplications
=
lookUp
(
fsLit
"-dsuppress-all"
)
||
lookUp
(
fsLit
"-dsuppress-type-applications"
)
-- | Suppress info such as arity and unfoldings on identifiers.
opt_SuppressIdInfo
::
Bool
opt_SuppressIdInfo
=
lookUp
(
fsLit
"-dsuppress-all"
)
||
lookUp
(
fsLit
"-dsuppress-idinfo"
)
opt_PprStyle_Debug
::
Bool
opt_PprStyle_Debug
::
Bool
opt_PprStyle_Debug
=
lookUp
(
fsLit
"-dppr-debug"
)
opt_PprStyle_Debug
=
lookUp
(
fsLit
"-dppr-debug"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment