From 9a84b3cd39bbed74353dcf8156bce2218c049317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 28 Sep 2024 20:38:48 +0200 Subject: Fix regex check in flush command Changelog: Fix regex check in flush command --- src/Run.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Run.hs') 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 -- cgit v1.2.3