Skip to content

kore-repl: call warnIfLowProductivity before throwing ExitSuccess or ExitFailure #2581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 4, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions kore/src/Kore/Repl/Interpreter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ import Kore.Internal.TermLike (
)
import qualified Kore.Internal.TermLike as TermLike
import qualified Kore.Log as Log
import Kore.Log.WarnIfLowProductivity (warnIfLowProductivity)
import Kore.Reachability (
ClaimState (..),
ClaimStateTransformer (..),
Expand Down Expand Up @@ -305,8 +306,12 @@ replInterpreter0 printAux printKore replCmd = do
output
case shouldContinue of
Continue -> pure Continue
SuccessStop -> liftIO exitSuccess
FailStop -> liftIO . exitWith $ ExitFailure 2
SuccessStop -> do
warnIfLowProductivity
liftIO exitSuccess
FailStop -> do
warnIfLowProductivity
liftIO . exitWith $ ExitFailure 2
where
-- Extracts the Writer out of the RWST monad using the current state
-- and updates the state, returning the writer output along with the
Expand Down