From 5fafe9905b59b101176dbe411272aedc519a994e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Tue, 8 Apr 2025 00:20:54 +0500 Subject: [PATCH] Allow defining resources that do not introduce variables. --- include/with99.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/with99.h b/include/with99.h index 6c878a9..a669f37 100644 --- a/include/with99.h +++ b/include/with99.h @@ -48,10 +48,14 @@ #define WITH99_priv_create_stmt_IMPL(tResNameArgs)\ ML99_TERMS(\ - ML99_appl(ML99_reify(v(ML99_INTRODUCE_VAR_TO_STMT)),\ - ML99_call(v(WITH99_priv_declare_resource),\ - v(tResNameArgs)\ - )\ + ML99_if(\ + ML99_variadicsIsSingle(ML99_call(v(WITH99_priv_restype), v(tResNameArgs))),\ + ML99_appl(ML99_reify(v(ML99_INTRODUCE_VAR_TO_STMT)),\ + ML99_call(v(WITH99_priv_declare_resource),\ + v(tResNameArgs)\ + )\ + ),\ + v()\ ),\ ML99_boolMatchWithArgs(\ ML99_call(\