aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/paradigm/object.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/paradigm/object.lux16
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/lux/paradigm/object.lux b/stdlib/source/lux/paradigm/object.lux
index 16269b66d..f215e4071 100644
--- a/stdlib/source/lux/paradigm/object.lux
+++ b/stdlib/source/lux/paradigm/object.lux
@@ -1,6 +1,6 @@
(;module:
lux
- (lux (control monad
+ (lux (control ["M" monad #+ do Monad]
["p" parser "p/" Monad<Parser>])
(data [text]
text/format
@@ -25,7 +25,7 @@
(case type
(#;Host name params)
(do Monad<Lux>
- [paramsC+ (mapM @ type-to-code params)]
+ [paramsC+ (M;map @ type-to-code params)]
(wrap (` (;host (~ (code;symbol ["" name]))
(~@ paramsC+)))))
@@ -38,7 +38,7 @@
(^template [<tag> <macro> <flatten>]
(<tag> _)
(do Monad<Lux>
- [partsC+ (mapM @ type-to-code (<flatten> type))]
+ [partsC+ (M;map @ type-to-code (<flatten> type))]
(wrap (` (<macro> (~@ partsC+))))))
([#;Sum ;| type;flatten-variant]
[#;Product ;& type;flatten-tuple])
@@ -46,7 +46,7 @@
(#;Function input output)
(do Monad<Lux>
[#let [[insT+ outT] (type;flatten-function type)]
- insC+ (mapM @ type-to-code insT+)
+ insC+ (M;map @ type-to-code insT+)
outC (type-to-code outT)]
(wrap (` (;-> (~@ insC+) (~ outC)))))
@@ -61,7 +61,7 @@
(do Monad<Lux>
[#let [[funcT argsT+] (type;flatten-application type)]
funcC (type-to-code funcT)
- argsC+ (mapM @ type-to-code argsT+)]
+ argsC+ (M;map @ type-to-code argsT+)]
(wrap (` ((~ funcC) (~@ argsC+)))))
(#;Named name unnamedT)
@@ -163,7 +163,7 @@
(do @
[newT (macro;find-def-type (product;both id ./n;new parent))
[depth rawT+] (./i;extract newT)
- codeT+ (mapM @ type-to-code rawT+)]
+ codeT+ (M;map @ type-to-code rawT+)]
(wrap (L/map (./i;specialize parent-mappings) codeT+)))))
#let [g!parameters (L/map code;local-symbol parameters)
@@ -177,8 +177,8 @@
g!parent-structs (if (./i;no-parent? parent)
(list)
(L/map (|>. (product;both id ./n;struct) code;symbol) (list& parent ancestors)))]
- g!parent-inits (mapM @ (function [_] (macro;gensym "parent-init"))
- g!parent-structs)
+ g!parent-inits (M;map @ (function [_] (macro;gensym "parent-init"))
+ g!parent-structs)
#let [g!full-init (L/fold (function [[parent-struct parent-state] child]
(` [(~ parent-struct) (~ parent-state) (~ child)]))
(` [(~ g!struct) (~ g!init) []])