summaryrefslogtreecommitdiff
path: root/src/Test
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-11-28 20:32:39 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2024-11-28 22:34:10 +0100
commit604d44dce0971443159e8fc35ee2b033ff958ac5 (patch)
treef81688f7474ac6833452fb724c69adf0d395abac /src/Test
parentd22257b9f43ba30dd3ca1274d1aa61e688585785 (diff)
Separate VarValue type without hidden type
Diffstat (limited to 'src/Test')
-rw-r--r--src/Test/Builtins.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Test/Builtins.hs b/src/Test/Builtins.hs
index 36f88e8..a36505a 100644
--- a/src/Test/Builtins.hs
+++ b/src/Test/Builtins.hs
@@ -29,7 +29,7 @@ getArgVars (FunctionArguments args) kw = do
maybe [] svvVariables $ M.lookup kw args
builtinSend :: SomeVarValue
-builtinSend = SomeVarValue [] (FunctionArguments $ M.fromList atypes) $
+builtinSend = SomeVarValue $ VarValue [] (FunctionArguments $ M.fromList atypes) $
\_ args -> TestBlock [ Send (getArg args (Just "to")) (getArg args Nothing) ]
where
atypes =
@@ -38,7 +38,7 @@ builtinSend = SomeVarValue [] (FunctionArguments $ M.fromList atypes) $
]
builtinFlush :: SomeVarValue
-builtinFlush = SomeVarValue [] (FunctionArguments $ M.fromList atypes) $
+builtinFlush = SomeVarValue $ VarValue [] (FunctionArguments $ M.fromList atypes) $
\_ args -> TestBlock [ Flush (getArg args (Just "from")) (getArgMb args (Just "matching")) ]
where
atypes =
@@ -47,8 +47,8 @@ builtinFlush = SomeVarValue [] (FunctionArguments $ M.fromList atypes) $
]
builtinGuard :: SomeVarValue
-builtinGuard = SomeVarValue [] (FunctionArguments $ M.singleton Nothing (SomeArgumentType (RequiredArgument @Bool))) $
+builtinGuard = SomeVarValue $ VarValue [] (FunctionArguments $ M.singleton Nothing (SomeArgumentType (RequiredArgument @Bool))) $
\sline args -> TestBlock [ Guard sline (getArgVars args Nothing) (getArg args Nothing) ]
builtinWait :: SomeVarValue
-builtinWait = SomeVarValue [] mempty $ const . const $ TestBlock [ Wait ]
+builtinWait = someConstValue $ TestBlock [ Wait ]