diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2026-04-25 10:51:21 +0200 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2026-04-25 15:22:59 +0200 |
| commit | 81d6d9f99ce8ea56df2c926156a3e3600a1a4117 (patch) | |
| tree | 4c61b3d51d7a7aa2da786053d10b74ca642467d6 /src/Test | |
| parent | d361b5cb163316d4e0c56cab30301e18b548afff (diff) | |
Polymorphic types in function arguments
Diffstat (limited to 'src/Test')
| -rw-r--r-- | src/Test/Builtins.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Test/Builtins.hs b/src/Test/Builtins.hs index 4ad6049..32483d1 100644 --- a/src/Test/Builtins.hs +++ b/src/Test/Builtins.hs @@ -40,8 +40,8 @@ builtinSend = SomeExpr $ ArgsReq (biArgs atypes) $ FunctionAbstraction $ TestBlockStep EmptyTestBlock <$> (Send <$> biVar "$to" <*> biVar "$0") where atypes = - [ ( Just "to", SomeArgumentType (ContextDefault @Process) ) - , ( Nothing, SomeArgumentType (RequiredArgument @Text) ) + [ ( Just "to", SomeArgumentType ContextDefault (ExprTypePrim (Proxy @Process)) ) + , ( Nothing, SomeArgumentType RequiredArgument (ExprTypePrim (Proxy @Text)) ) ] builtinFlush :: SomeExpr @@ -49,8 +49,8 @@ builtinFlush = SomeExpr $ ArgsReq (biArgs atypes) $ FunctionAbstraction $ TestBlockStep EmptyTestBlock <$> (Flush <$> biVar "$from" <*> biOpt "$matching") where atypes = - [ ( Just "from", SomeArgumentType (ContextDefault @Process) ) - , ( Just "matching", SomeArgumentType (OptionalArgument @Regex) ) + [ ( Just "from", SomeArgumentType ContextDefault (ExprTypePrim (Proxy @Process)) ) + , ( Just "matching", SomeArgumentType OptionalArgument (ExprTypePrim (Proxy @Regex)) ) ] builtinIgnore :: SomeExpr @@ -58,17 +58,17 @@ builtinIgnore = SomeExpr $ ArgsReq (biArgs atypes) $ FunctionAbstraction $ TestBlockStep EmptyTestBlock <$> (CreateObject (Proxy @IgnoreProcessOutput) <$> ((,) <$> biVar "$from" <*> biOpt "$matching")) where atypes = - [ ( Just "from", SomeArgumentType (ContextDefault @Process) ) - , ( Just "matching", SomeArgumentType (OptionalArgument @Regex) ) + [ ( Just "from", SomeArgumentType ContextDefault (ExprTypePrim (Proxy @Process)) ) + , ( Just "matching", SomeArgumentType OptionalArgument (ExprTypePrim (Proxy @Regex)) ) ] builtinGuard :: SomeExpr builtinGuard = SomeExpr $ - ArgsReq (biArgs [ ( Nothing, SomeArgumentType (RequiredArgument @Bool) ) ]) $ + ArgsReq (biArgs [ ( Nothing, SomeArgumentType RequiredArgument (ExprTypePrim (Proxy @Bool)) ) ]) $ FunctionAbstraction $ TestBlockStep EmptyTestBlock <$> (Guard <$> Variable SourceLineBuiltin callStackFqVarName <*> biVar "$0") builtinMultiplyTimeout :: SomeExpr -builtinMultiplyTimeout = SomeExpr $ ArgsReq (biArgs $ [ ( Just "by", SomeArgumentType (RequiredArgument @Scientific) ) ]) $ +builtinMultiplyTimeout = SomeExpr $ ArgsReq (biArgs $ [ ( Just "by", SomeArgumentType RequiredArgument (ExprTypePrim (Proxy @Scientific)) ) ]) $ FunctionAbstraction $ TestBlockStep EmptyTestBlock <$> (CreateObject (Proxy @MultiplyTimeout) <$> biVar "$by") builtinWait :: SomeExpr |