From 3640256e80ba1aa1c1e022a231234dee814ace58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 15 Feb 2025 20:38:39 +0100 Subject: Collect and evaluate global definitions together --- src/Test/Builtins.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Test') diff --git a/src/Test/Builtins.hs b/src/Test/Builtins.hs index 29e54af..bf22ff8 100644 --- a/src/Test/Builtins.hs +++ b/src/Test/Builtins.hs @@ -9,15 +9,15 @@ import Data.Text (Text) import Process (Process) import Test -builtins :: [ ( FqVarName, SomeVarValue ) ] -builtins = +builtins :: GlobalDefs +builtins = M.fromList [ fq "send" builtinSend , fq "flush" builtinFlush , fq "guard" builtinGuard , fq "wait" builtinWait ] where - fq name impl = ( GlobalVarName (ModuleName [ "$" ]) (VarName name), impl ) + fq name impl = (( ModuleName [ "$" ], VarName name ), impl ) getArg :: ExprType a => FunctionArguments SomeVarValue -> Maybe ArgumentKeyword -> a getArg args = fromMaybe (error "parameter mismatch") . getArgMb args -- cgit v1.2.3