summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2023-05-06 18:44:45 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2023-05-06 18:44:45 +0200
commitc07f047bc90b6052b7d61de8efcbd7cb9d763e46 (patch)
tree23875305e5f0bacdf1d61e4f717a007321f51286
parentc4836c2078d32eee18824c2fed5069bd841256eb (diff)
Drop support for introducing node variable by 'spawn' command
-rw-r--r--src/Run.hs5
-rw-r--r--src/Test.hs2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/Run.hs b/src/Run.hs
index 58df868..01c4a03 100644
--- a/src/Run.hs
+++ b/src/Run.hs
@@ -128,9 +128,8 @@ evalSteps = mapM_ $ \case
Spawn tvname@(TypedVarName vname@(VarName tname)) target inner -> do
case target of
- Left nname -> withNode RootNetwork (Left nname) go
- Right (Left net) -> withNode net (Right tvname) go
- Right (Right node) -> go =<< eval node
+ Left net -> withNode net (Right tvname) go
+ Right node -> go =<< eval node
where
go node = do
opts <- asks $ teOptions . fst
diff --git a/src/Test.hs b/src/Test.hs
index af1bace..398fa03 100644
--- a/src/Test.hs
+++ b/src/Test.hs
@@ -38,7 +38,7 @@ data TestStep = forall a. ExprType a => Let SourceLine (TypedVarName a) (Expr a)
| forall a. ExprType a => For SourceLine (TypedVarName a) (Expr [a]) [TestStep]
| Subnet (TypedVarName Network) (Expr Network) [TestStep]
| DeclNode (TypedVarName Node) (Expr Network) [TestStep]
- | Spawn (TypedVarName Process) (Either (TypedVarName Node) (Either (Expr Network) (Expr Node))) [TestStep]
+ | Spawn (TypedVarName Process) (Either (Expr Network) (Expr Node)) [TestStep]
| Send (Expr Process) (Expr Text)
| Expect SourceLine (Expr Process) (Expr Regex) [TypedVarName Text] [TestStep]
| Guard SourceLine (Expr Bool)