diff options
author | Eduardo Julian | 2017-12-02 13:55:48 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-12-02 13:55:48 -0400 |
commit | 5c4a26c9344898c4fa958946b47b55e1c84818bd (patch) | |
tree | fe599294cc3d08ca1995a7cd58a51baa18689944 /new-luxc/source/luxc | |
parent | 1651d847ba70ee36171f3809a25bece325fd5715 (diff) |
- "gensym" went back to producing Code, instead of Ident.
Diffstat (limited to 'new-luxc/source/luxc')
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/structure.lux | 7 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/eval.jvm.lux | 2 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/procedure/common.jvm.lux | 17 |
3 files changed, 12 insertions, 14 deletions
diff --git a/new-luxc/source/luxc/lang/analysis/structure.lux b/new-luxc/source/luxc/lang/analysis/structure.lux index 4561388c9..ce678837e 100644 --- a/new-luxc/source/luxc/lang/analysis/structure.lux +++ b/new-luxc/source/luxc/lang/analysis/structure.lux @@ -156,12 +156,11 @@ ## blurring the line between what was wanted (the separation) ## and what was analysed. [tailT tailC] - (do @ - [g!tail (macro.gensym "tail")] + (macro.with-gensyms [g!tail] (&.with-type tailT (analyse (` ("lux case" [(~+ tailC)] - (~@ g!tail) - (~@ g!tail)))))) + (~ g!tail) + (~ g!tail)))))) )))) (def: #export (analyse-product analyse membersC) diff --git a/new-luxc/source/luxc/lang/translation/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/eval.jvm.lux index 2236815ea..9cce16a49 100644 --- a/new-luxc/source/luxc/lang/translation/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/eval.jvm.lux @@ -25,7 +25,7 @@ (-> $.Inst (Meta Top)) (do macro.Monad<Meta> [current-module macro.current-module-name - [_ class-name] (macro.gensym (format current-module "/eval")) + class-name (:: @ map %code (macro.gensym (format current-module "/eval"))) #let [store-name (text.replace-all "/" "." class-name) bytecode ($d.class #$.V1_6 #$.Public $.noneC 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 91c5c5f95..336293dc4 100644 --- a/new-luxc/source/luxc/lang/translation/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/procedure/common.jvm.lux @@ -84,24 +84,23 @@ (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"))) - #let [g!input+ (list/map code.symbol g!input+)]] - (wrap (list (` (def: #export ((~ (code.local-symbol name)) (~@ g!proc)) + [g!input+ (monad.seq @ (list.repeat arity (macro.gensym "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) + (function [(~ g!name)] + (function [(~ g!translate) (~ g!inputs)] + (case (~ g!inputs) (^ (list (~+ g!input+))) (do macro.Monad<Meta> [(~+ (|> 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) |