Commit 006bb4c1 authored by iavor.diatchki@gmail.com's avatar iavor.diatchki@gmail.com
Browse files

refactor: combine repeated code in file reloading

parent 27e9c93a
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment