diff options
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/procedure/common.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/procedure/common.jvm.lux | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/new-luxc/source/luxc/lang/translation/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/procedure/common.jvm.lux index 41d9b91ab..91c5c5f95 100644 --- a/new-luxc/source/luxc/lang/translation/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/procedure/common.jvm.lux @@ -47,7 +47,7 @@ (Dict Text Proc)) (syntax: (Vector [size s.nat] elemT) - (wrap (list (` [(~@ (list.repeat size elemT))])))) + (wrap (list (` [(~+ (list.repeat size elemT))])))) (type: #export Nullary (-> (Vector +0 $.Inst) $.Inst)) (type: #export Unary (-> (Vector +1 $.Inst) $.Inst)) @@ -84,23 +84,24 @@ (syntax: (arity: [name s.local-symbol] [arity s.nat]) (with-gensyms [g!proc g!name g!translate g!inputs] (do @ - [g!input+ (monad.seq @ (list.repeat arity (macro.gensym "input")))] - (wrap (list (` (def: #export ((~ (code.local-symbol name)) (~ g!proc)) + [g!input+ (monad.seq @ (list.repeat arity (macro.gensym "input"))) + #let [g!input+ (list/map code.symbol g!input+)]] + (wrap (list (` (def: #export ((~ (code.local-symbol name)) (~@ g!proc)) (-> (-> (..Vector (~ (code.nat arity)) $.Inst) $.Inst) (-> Text ..Proc)) - (function [(~ g!name)] - (function [(~ g!translate) (~ g!inputs)] - (case (~ g!inputs) - (^ (list (~@ g!input+))) + (function [(~@ g!name)] + (function [(~@ g!translate) (~@ g!inputs)] + (case (~@ g!inputs) + (^ (list (~+ g!input+))) (do macro.Monad<Meta> - [(~@ (|> g!input+ + [(~+ (|> g!input+ (list/map (function [g!input] - (list g!input (` ((~ g!translate) (~ g!input)))))) + (list g!input (` ((~@ g!translate) (~ g!input)))))) list.concat))] - ((~' wrap) ((~ g!proc) [(~@ g!input+)]))) + ((~' wrap) ((~@ g!proc) [(~+ g!input+)]))) (~' _) - (macro.fail (wrong-arity (~ g!name) +1 (list.size (~ g!inputs)))))))))))))) + (macro.fail (wrong-arity (~@ g!name) +1 (list.size (~@ g!inputs)))))))))))))) (arity: nullary +0) (arity: unary +1) |