summaryrefslogtreecommitdiff
path: root/src/Run.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-09-28 20:38:48 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2024-09-28 20:38:48 +0200
commit9a84b3cd39bbed74353dcf8156bce2218c049317 (patch)
tree481e3408e145cc1ec8e842172abb29a1ad5596dd /src/Run.hs
parent9b947899eea2852e9855fa30595e7a3176b70875 (diff)
Fix regex check in flush command
Changelog: Fix regex check in flush command
Diffstat (limited to 'src/Run.hs')
-rw-r--r--src/Run.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Run.hs b/src/Run.hs
index a1692cb..b67c287 100644
--- a/src/Run.hs
+++ b/src/Run.hs
@@ -10,7 +10,6 @@ import Control.Monad
import Control.Monad.Except
import Control.Monad.Reader
-import Data.Either
import Data.Map qualified as M
import Data.Maybe
import Data.Set qualified as S
@@ -323,7 +322,7 @@ flush p mbexpr = do
atomicallyTest $ do
writeTVar (procOutput p) =<< case mbre of
Nothing -> return []
- Just re -> filter (isLeft . regexMatch re) <$> readTVar (procOutput p)
+ Just re -> filter (either error isNothing . regexMatch re) <$> readTVar (procOutput p)
testStepGuard :: SourceLine -> Expr Bool -> TestRun ()
testStepGuard sline expr = do