Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
eb2d8fe3
Commit
eb2d8fe3
authored
Dec 08, 2010
by
benl
Browse files
Implement -dsuppress-type-signatures
parent
69a804e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
compiler/coreSyn/PprCore.lhs
View file @
eb2d8fe3
...
...
@@ -282,8 +282,9 @@ pprTypedLCBinder bind_site debug_on var
pprTypedBinder :: Var -> SDoc
-- Print binder with a type or kind signature (not paren'd)
pprTypedBinder binder
| isTyCoVar binder = pprKindedTyVarBndr binder
| otherwise = hang (pprIdBndr binder) 2 (dcolon <+> pprType (idType binder))
| isTyCoVar binder = pprKindedTyVarBndr binder
| opt_SuppressTypeSignatures = empty
| otherwise = hang (pprIdBndr binder) 2 (dcolon <+> pprType (idType binder))
pprKindedTyVarBndr :: TyVar -> SDoc
-- Print a type variable binder with its kind (but not if *)
...
...
compiler/main/StaticFlagParser.hs
View file @
eb2d8fe3
...
...
@@ -128,6 +128,7 @@ static_flags = [
,
Flag
"dsuppress-module-prefixes"
(
PassFlag
addOpt
)
,
Flag
"dsuppress-type-applications"
(
PassFlag
addOpt
)
,
Flag
"dsuppress-idinfo"
(
PassFlag
addOpt
)
,
Flag
"dsuppress-type-signatures"
(
PassFlag
addOpt
)
,
Flag
"dppr-user-length"
(
AnySuffix
addOpt
)
,
Flag
"dopt-fuel"
(
AnySuffix
addOpt
)
,
Flag
"dtrace-level"
(
AnySuffix
addOpt
)
...
...
compiler/main/StaticFlags.hs
View file @
eb2d8fe3
...
...
@@ -21,14 +21,17 @@ module StaticFlags (
-- Output style options
opt_PprUserLength
,
opt_PprStyle_Debug
,
opt_TraceLevel
,
opt_NoDebugOutput
,
-- Suppressing boring aspects of core dumps
opt_SuppressAll
,
opt_SuppressUniques
,
opt_SuppressCoercions
,
opt_SuppressModulePrefixes
,
opt_SuppressTypeApplications
,
opt_SuppressIdInfo
,
opt_PprStyle_Debug
,
opt_TraceLevel
,
opt_NoDebugOutput
,
opt_SuppressTypeSignatures
,
-- profiling opts
opt_SccProfilingOn
,
...
...
@@ -219,7 +222,13 @@ opt_SuppressIdInfo :: Bool
opt_SuppressIdInfo
=
lookUp
(
fsLit
"-dsuppress-all"
)
||
lookUp
(
fsLit
"-dsuppress-idinfo"
)
-- | Suppress seprate type signatures in core, but leave types on lambda bound vars
opt_SuppressTypeSignatures
::
Bool
opt_SuppressTypeSignatures
=
lookUp
(
fsLit
"-dsuppress-all"
)
||
lookUp
(
fsLit
"-dsuppress-type-signatures"
)
opt_PprStyle_Debug
::
Bool
opt_PprStyle_Debug
=
lookUp
(
fsLit
"-dppr-debug"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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