From 74a835634fc9ee5457f3cc7109af069dad9f2d2f Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 11 Oct 2017 18:57:44 -0400 Subject: - Migrated new-luxc to latest version of stdlib. - Some refactoring. --- .../source/luxc/generator/procedure/common.jvm.lux | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'new-luxc/source/luxc/generator/procedure/common.jvm.lux') diff --git a/new-luxc/source/luxc/generator/procedure/common.jvm.lux b/new-luxc/source/luxc/generator/procedure/common.jvm.lux index 9f8afdbb2..ffbe69708 100644 --- a/new-luxc/source/luxc/generator/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/generator/procedure/common.jvm.lux @@ -3,9 +3,9 @@ (lux (control [monad #+ do]) (data [text] text/format - (coll [list "L/" Functor Monoid] - ["D" dict])) - [macro #+ Monad with-gensyms] + (coll [list "list/" Functor] + [dict #+ Dict])) + [macro #+ with-gensyms] (macro [code] ["s" syntax #+ syntax:]) [host]) @@ -41,7 +41,7 @@ (-> Generator (List ls;Synthesis) (Lux $;Inst))) (type: Bundle - (D;Dict Text Proc)) + (Dict Text Proc)) (syntax: (Vector [size s;nat] elemT) (wrap (list (` [(~@ (list;repeat size elemT))])))) @@ -61,7 +61,7 @@ (def: (install name unnamed) (-> Text (-> Text Proc) (-> Bundle Bundle)) - (D;put name (unnamed name))) + (dict;put name (unnamed name))) (def: (wrong-amount-error proc expected actual) (-> Text Nat Nat Text) @@ -82,8 +82,8 @@ (^ (list (~@ g!input+))) (do macro;Monad [(~@ (|> g!input+ - (L/map (function [g!input] - (list g!input (` ((~ g!generate) (~ g!input)))))) + (list/map (function [g!input] + (list g!input (` ((~ g!generate) (~ g!input)))))) list;concat))] ((~' wrap) ((~ g!proc) [(~@ g!input+)]))) @@ -527,13 +527,13 @@ ## [Bundles] (def: lux-procs Bundle - (|> (D;new text;Hash) + (|> (dict;new text;Hash) (install "lux is" (binary lux//is)) (install "lux try" (unary lux//try)))) (def: bit-procs Bundle - (|> (D;new text;Hash) + (|> (dict;new text;Hash) (install "bit count" (unary bit//count)) (install "bit and" (binary bit//and)) (install "bit or" (binary bit//or)) @@ -545,7 +545,7 @@ (def: nat-procs Bundle - (|> (D;new text;Hash) + (|> (dict;new text;Hash) (install "nat +" (binary nat//add)) (install "nat -" (binary nat//sub)) (install "nat *" (binary nat//mul)) @@ -560,7 +560,7 @@ (def: int-procs Bundle - (|> (D;new text;Hash) + (|> (dict;new text;Hash) (install "int +" (binary int//add)) (install "int -" (binary int//sub)) (install "int *" (binary int//mul)) @@ -575,7 +575,7 @@ (def: deg-procs Bundle - (|> (D;new text;Hash) + (|> (dict;new text;Hash) (install "deg +" (binary deg//add)) (install "deg -" (binary deg//sub)) (install "deg *" (binary deg//mul)) @@ -591,7 +591,7 @@ (def: frac-procs Bundle - (|> (D;new text;Hash) + (|> (dict;new text;Hash) (install "frac +" (binary frac//add)) (install "frac -" (binary frac//sub)) (install "frac *" (binary frac//mul)) @@ -612,7 +612,7 @@ (def: text-procs Bundle - (|> (D;new text;Hash) + (|> (dict;new text;Hash) (install "text =" (binary text//eq)) (install "text <" (binary text//lt)) (install "text append" (binary text//append)) @@ -626,7 +626,7 @@ (def: array-procs Bundle - (|> (D;new text;Hash) + (|> (dict;new text;Hash) (install "array new" (unary array//new)) (install "array get" (binary array//get)) (install "array put" (trinary array//put)) @@ -636,7 +636,7 @@ (def: math-procs Bundle - (|> (D;new text;Hash) + (|> (dict;new text;Hash) (install "math cos" (unary math//cos)) (install "math sin" (unary math//sin)) (install "math tan" (unary math//tan)) @@ -659,7 +659,7 @@ (def: io-procs Bundle - (|> (D;new text;Hash) + (|> (dict;new text;Hash) (install "io log" (unary io//log)) (install "io error" (unary io//error)) (install "io exit" (unary io//exit)) @@ -667,14 +667,14 @@ (def: atom-procs Bundle - (|> (D;new text;Hash) + (|> (dict;new text;Hash) (install "atom new" (unary atom//new)) (install "atom read" (unary atom//read)) (install "atom compare-and-swap" (trinary atom//compare-and-swap)))) (def: process-procs Bundle - (|> (D;new text;Hash) + (|> (dict;new text;Hash) (install "process concurrency-level" (nullary process//concurrency-level)) (install "process future" (unary process//future)) (install "process schedule" (binary process//schedule)) @@ -682,17 +682,17 @@ (def: #export procedures Bundle - (|> (D;new text;Hash) - (D;merge lux-procs) - (D;merge bit-procs) - (D;merge nat-procs) - (D;merge int-procs) - (D;merge deg-procs) - (D;merge frac-procs) - (D;merge text-procs) - (D;merge array-procs) - (D;merge math-procs) - (D;merge io-procs) - (D;merge atom-procs) - (D;merge process-procs) + (|> (dict;new text;Hash) + (dict;merge lux-procs) + (dict;merge bit-procs) + (dict;merge nat-procs) + (dict;merge int-procs) + (dict;merge deg-procs) + (dict;merge frac-procs) + (dict;merge text-procs) + (dict;merge array-procs) + (dict;merge math-procs) + (dict;merge io-procs) + (dict;merge atom-procs) + (dict;merge process-procs) )) -- cgit v1.2.3