From 1a8b4fbabdb1e3426f0da93817f93071b5985f2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Wed, 13 Nov 2024 19:54:04 +0100 Subject: Keep track of used variables alongside evaluated expressions --- src/Run/Monad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Run/Monad.hs') diff --git a/src/Run/Monad.hs b/src/Run/Monad.hs index 1890572..54600f0 100644 --- a/src/Run/Monad.hs +++ b/src/Run/Monad.hs @@ -96,7 +96,7 @@ instance MonadEval TestRun where lookupVar name = maybe (fail $ "variable not in scope: '" ++ unpackVarName name ++ "'") return =<< asks (lookup name . tsVars . snd) rootNetwork = asks $ tsNetwork . snd - withVar name value = local (fmap $ \s -> s { tsVars = ( name, SomeVarValue mempty $ const $ const value ) : tsVars s }) + withVar name value = local (fmap $ \s -> s { tsVars = ( name, SomeVarValue [] mempty $ const $ const value ) : tsVars s }) instance MonadOutput TestRun where getOutput = asks $ teOutput . fst -- cgit v1.2.3