Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
d99531b1
Commit
d99531b1
authored
26 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1998-04-30 19:26:33 by sof]
New options: -fwarn-hi-shadowing and -fclone-binds
parent
d91cd59b
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/main/CmdLineOpts.lhs
+11
-1
11 additions, 1 deletion
ghc/compiler/main/CmdLineOpts.lhs
with
11 additions
and
1 deletion
ghc/compiler/main/CmdLineOpts.lhs
+
11
−
1
View file @
d99531b1
...
...
@@ -99,6 +99,7 @@ module CmdLineOpts (
opt_WarnSimplePatterns,
opt_WarnMissingMethods,
opt_WarnDuplicateExports,
opt_WarnHiShadows,
opt_PruneTyDecls, opt_PruneInstDecls,
opt_D_show_rn_stats
) where
...
...
@@ -230,6 +231,12 @@ data SimplifierSwitch
-- the scrutinee of a case expression, so we should
-- apply the scrutinee discount when considering inlinings.
-- See SimplVar.lhs
| SimplCloneBinds -- This flag controls whether the simplifier should
-- always clone binder ids when creating expression
-- copies. The default is NO, but it needs to be turned on
-- prior to floating binders outwards.
-- (see comment inside SimplVar.simplBinder)
\end{code}
%************************************************************************
...
...
@@ -344,6 +351,7 @@ opt_UnfoldingConDiscount = lookup_def_int "-funfolding-con-discount" uNFOLDIN
opt_LiberateCaseThreshold = lookup_def_int "-fliberate-case-threshold" lIBERATE_CASE_THRESHOLD
opt_UnfoldingKeenessFactor = lookup_def_float "-funfolding-keeness-factor" uNFOLDING_KEENESS_FACTOR
opt_WarnNameShadowing = lookUp SLIT("-fwarn-name-shadowing")
opt_WarnHiShadows = lookUp SLIT("-fwarn-hi-shadowing")
opt_WarnIncompletePatterns = lookUp SLIT("-fwarn-incomplete-patterns")
opt_WarnOverlappingPatterns = lookUp SLIT("-fwarn-overlapping-patterns")
opt_WarnSimplePatterns = lookUp SLIT("-fwarn-simple-patterns")
...
...
@@ -456,6 +464,7 @@ classifyOpts = sep argv [] [] -- accumulators...
"-fno-let-from-case" -> SIMPL_SW(SimplNoLetFromCase)
"-fno-let-from-app" -> SIMPL_SW(SimplNoLetFromApp)
"-fno-let-from-strict-let" -> SIMPL_SW(SimplNoLetFromStrictLet)
"-fclone-binds" -> SIMPL_SW(SimplCloneBinds)
o | starts_with_msi -> SIMPL_SW(MaxSimplifierIterations (read after_msi))
where
...
...
@@ -508,12 +517,13 @@ tagOf_SimplSwitch SimplNoLetFromStrictLet = ILIT(29)
tagOf_SimplSwitch SimplDontFoldBackAppend = ILIT(30)
tagOf_SimplSwitch SimplCaseMerge = ILIT(31)
tagOf_SimplSwitch SimplCaseScrutinee = ILIT(32)
tagOf_SimplSwitch SimplCloneBinds = ILIT(33)
-- If you add anything here, be sure to change lAST_SIMPL_SWITCH_TAG, too!
tagOf_SimplSwitch _ = panic# "tagOf_SimplSwitch"
lAST_SIMPL_SWITCH_TAG = IBOX(tagOf_SimplSwitch SimplC
aseScrutinee
)
lAST_SIMPL_SWITCH_TAG = IBOX(tagOf_SimplSwitch SimplC
loneBinds
)
\end{code}
%************************************************************************
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment