Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
006bb4c1
Commit
006bb4c1
authored
May 25, 2007
by
iavor.diatchki@gmail.com
Browse files
refactor: combine repeated code in file reloading
parent
27e9c93a
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/ghci/InteractiveUI.hs
View file @
006bb4c1
...
...
@@ -868,17 +868,12 @@ checkModule m = do
afterLoad
(
successIf
(
isJust
result
))
session
reloadModule
::
String
->
GHCi
()
reloadModule
""
=
do
io
(
revertCAFs
)
-- always revert CAFs on reload.
discardActiveBreakPoints
session
<-
getSession
doLoad
session
LoadAllTargets
return
()
reloadModule
m
=
do
io
(
revertCAFs
)
-- always revert CAFs on reload.
discardActiveBreakPoints
session
<-
getSession
doLoad
session
(
LoadUpTo
(
GHC
.
mkModuleName
m
))
doLoad
session
$
if
null
m
then
LoadAllTargets
else
LoadUpTo
(
GHC
.
mkModuleName
m
)
return
()
doLoad
session
howmuch
=
do
...
...
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