diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-11-28 20:32:39 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-11-28 22:34:10 +0100 |
commit | 604d44dce0971443159e8fc35ee2b033ff958ac5 (patch) | |
tree | f81688f7474ac6833452fb724c69adf0d395abac /src/Test/Builtins.hs | |
parent | d22257b9f43ba30dd3ca1274d1aa61e688585785 (diff) |
Separate VarValue type without hidden type
Diffstat (limited to 'src/Test/Builtins.hs')
-rw-r--r-- | src/Test/Builtins.hs | 8 |
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 ] |