diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-09-21 21:19:37 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-09-24 20:02:36 +0200 |
commit | 274554243235d3013430a48973fd0f25244ac392 (patch) | |
tree | 122353115dc3205ba41b1133e0dd20c82c2d3118 /src/Run.hs | |
parent | 0a51c798d1322297f13ce6bc7a500ce5212b5e8e (diff) |
Function parameters and calls
Diffstat (limited to 'src/Run.hs')
-rw-r--r-- | src/Run.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -188,7 +188,7 @@ evalSteps = mapM_ $ \case withVar :: ExprType e => VarName -> e -> TestRun a -> TestRun a -withVar name value = local (fmap $ \s -> s { tsVars = (name, SomeVarValue value) : tsVars s }) +withVar name value = local (fmap $ \s -> s { tsVars = ( name, SomeVarValue mempty $ const value ) : tsVars s }) withInternet :: (Network -> TestRun a) -> TestRun a withInternet inner = do @@ -310,7 +310,7 @@ expect (SourceLine sline) p expr tvars inner = do throwError Failed outProc OutputMatch p line - local (fmap $ \s -> s { tsVars = zip vars (map SomeVarValue capture) ++ tsVars s }) inner + local (fmap $ \s -> s { tsVars = zip vars (map (SomeVarValue mempty . const) capture) ++ tsVars s }) inner Nothing -> exprFailed (T.pack "expect") (SourceLine sline) (Just $ procName p) expr |