diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2012-11-29 21:16:30 +1100 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2012-11-30 01:27:25 +1100 |
commit | 77ef6ca06d401eda2aeb51d22d5ce033db667161 (patch) | |
tree | 21dd2e159a9b7ec568147b6c27e74dc9da954492 /compiler/main/InteractiveEval.hs | |
parent | 086d7c54f5bddbc9e5d94a9ae9c4b5aeeab53a35 (diff) | |
download | haskell-77ef6ca06d401eda2aeb51d22d5ce033db667161.tar.gz |
Replace all uses of ghcError with throwGhcException and purge ghcError.
Diffstat (limited to 'compiler/main/InteractiveEval.hs')
-rw-r--r-- | compiler/main/InteractiveEval.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/main/InteractiveEval.hs b/compiler/main/InteractiveEval.hs index 9b9c14bb0b..5f7d0c7d99 100644 --- a/compiler/main/InteractiveEval.hs +++ b/compiler/main/InteractiveEval.hs @@ -468,7 +468,7 @@ resume canLogSpan step resume = ic_resume ic case resume of - [] -> ghcError (ProgramError "not stopped at a breakpoint") + [] -> throwGhcException (ProgramError "not stopped at a breakpoint") (r:rs) -> do -- unbind the temporary locals by restoring the TypeEnv from -- before the breakpoint, and drop this Resume from the @@ -525,16 +525,16 @@ moveHist :: GhcMonad m => (Int -> Int) -> m ([Name], Int, SrcSpan) moveHist fn = do hsc_env <- getSession case ic_resume (hsc_IC hsc_env) of - [] -> ghcError (ProgramError "not stopped at a breakpoint") + [] -> throwGhcException (ProgramError "not stopped at a breakpoint") (r:rs) -> do let ix = resumeHistoryIx r history = resumeHistory r new_ix = fn ix -- when (new_ix > length history) $ - ghcError (ProgramError "no more logged breakpoints") + throwGhcException (ProgramError "no more logged breakpoints") when (new_ix < 0) $ - ghcError (ProgramError "already at the beginning of the history") + throwGhcException (ProgramError "already at the beginning of the history") let update_ic apStack mb_info = do @@ -816,7 +816,7 @@ setContext imports ; let dflags = hsc_dflags hsc_env ; all_env_err <- liftIO $ findGlobalRdrEnv hsc_env imports ; case all_env_err of - Left (mod, err) -> ghcError (formatError dflags mod err) + Left (mod, err) -> throwGhcException (formatError dflags mod err) Right all_env -> do { ; let old_ic = hsc_IC hsc_env final_rdr_env = ic_tythings old_ic `icPlusGblRdrEnv` all_env |