Respect flags during execution
This commit is contained in:
parent
7397a0fecd
commit
564bc44d51
2 changed files with 32 additions and 18 deletions
|
|
@ -16,12 +16,12 @@ main = runOrExit 2 $ do
|
|||
initialState <- loadMimaState $ inputFile opts
|
||||
finalState <- liftIO $ case steps opts of
|
||||
Nothing -> do
|
||||
let (finalState, abortReason, stepsMade) = execute initialState
|
||||
let (finalState, abortReason, stepsMade) = execute mempty initialState
|
||||
putStrLn $ "Stopped after " ++ show stepsMade ++ " steps, reason:"
|
||||
T.putStrLn $ toText abortReason
|
||||
pure finalState
|
||||
Just n -> do
|
||||
let (finalState, mAbortReason, stepsMade) = executeN n initialState
|
||||
let (finalState, mAbortReason, stepsMade) = executeN n mempty initialState
|
||||
putStrLn $ "Stopped after " ++ show stepsMade ++ " steps, reason:"
|
||||
case mAbortReason of
|
||||
Nothing -> putStrLn "Ran out of steps"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue