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
Glasgow Haskell Compiler
GHC
Commits
7acee066
Commit
7acee066
authored
Nov 15, 2016
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid calling newDynFlags when there are no changes
This is a small optimisation for :set and :unset
parent
fa70b1ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
ghc/GHCi/UI.hs
ghc/GHCi/UI.hs
+2
-2
No files found.
ghc/GHCi/UI.hs
View file @
7acee066
...
...
@@ -2564,7 +2564,7 @@ setOptions wds =
let
(
plus_opts
,
minus_opts
)
=
partitionWith
isPlus
wds
mapM_
setOpt
plus_opts
-- then, dynamic flags
newDynFlags
False
minus_opts
when
(
not
(
null
minus_opts
))
$
newDynFlags
False
minus_opts
packageFlagsChanged
::
DynFlags
->
DynFlags
->
Bool
packageFlagsChanged
idflags1
idflags0
=
...
...
@@ -2661,7 +2661,7 @@ unsetOptions str
mapM_
unsetOpt
plus_opts
no_flags
<-
mapM
no_flag
minus_opts
newDynFlags
False
no_flags
when
(
not
(
null
no_flags
))
$
newDynFlags
False
no_flags
isMinus
::
String
->
Bool
isMinus
(
'-'
:
_
)
=
True
...
...
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