diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/target/lua.lux | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/stdlib/source/library/lux/target/lua.lux b/stdlib/source/library/lux/target/lua.lux index 9ececec5f..51c4ac911 100644 --- a/stdlib/source/library/lux/target/lua.lux +++ b/stdlib/source/library/lux/target/lua.lux @@ -16,7 +16,7 @@ [collection ["[0]" list (.open: "[1]#[0]" functor mix)]]] [macro - [syntax (.only syntax:)] + [syntax (.only syntax)] ["[0]" template] ["[0]" code]] [math @@ -373,15 +373,17 @@ (abstraction (format "-- " commentary \n+ (representation on)))) ) -(syntax: (arity_inputs [arity <code>.nat]) - (in (case arity - 0 (.list) - _ (|> (-- arity) - (enum.range n.enum 0) - (list#each (|>> %.nat code.local)))))) - -(syntax: (arity_types [arity <code>.nat]) - (in (list.repeated arity (` ..Expression)))) +(def: arity_inputs + (syntax (_ [arity <code>.nat]) + (in (case arity + 0 (.list) + _ (|> (-- arity) + (enum.range n.enum 0) + (list#each (|>> %.nat code.local))))))) + +(def: arity_types + (syntax (_ [arity <code>.nat]) + (in (list.repeated arity (` ..Expression))))) (template [<arity> <function>+] [(with_expansions [<inputs> (arity_inputs <arity>) |