aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/macro/poly.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/macro/poly.lux36
1 files changed, 18 insertions, 18 deletions
diff --git a/stdlib/source/library/lux/macro/poly.lux b/stdlib/source/library/lux/macro/poly.lux
index a9f4a5744..892f23284 100644
--- a/stdlib/source/library/lux/macro/poly.lux
+++ b/stdlib/source/library/lux/macro/poly.lux
@@ -29,19 +29,19 @@
body)
(with_gensyms [g!_ g!type g!output]
(let [g!name (code.identifier ["" name])]
- (wrap (.list (` ((~! syntax:) (~+ (|export|.format export)) ((~ g!name) {(~ g!type) (~! <code>.identifier)})
- ((~! do) (~! meta.monad)
- [(~ g!type) ((~! meta.find_type_def) (~ g!type))]
- (case (: (.Either .Text .Code)
- ((~! <type>.run) ((~! <>.rec)
- (function ((~ g!_) (~ g!name))
- (~ body)))
- (~ g!type)))
- (#.Left (~ g!output))
- ((~! meta.failure) (~ g!output))
+ (in (.list (` ((~! syntax:) (~+ (|export|.format export)) ((~ g!name) {(~ g!type) (~! <code>.identifier)})
+ ((~! do) (~! meta.monad)
+ [(~ g!type) ((~! meta.type_definition) (~ g!type))]
+ (case (: (.Either .Text .Code)
+ ((~! <type>.run) ((~! <>.rec)
+ (function ((~ g!_) (~ g!name))
+ (~ body)))
+ (~ g!type)))
+ (#.Left (~ g!output))
+ ((~! meta.failure) (~ g!output))
- (#.Right (~ g!output))
- ((~' wrap) (.list (~ g!output))))))))))))
+ (#.Right (~ g!output))
+ ((~' in) (.list (~ g!output))))))))))))
(def: (common_poly_name? poly_func)
(-> Text Bit)
@@ -61,12 +61,12 @@
[poly_args (monad.map ! meta.normal poly_args)
name (case ?name
(#.Some name)
- (wrap name)
+ (in name)
(^multi #.None
{(derivation_name (product.right poly_func) (list\map product.right poly_args))
(#.Some derived_name)})
- (wrap derived_name)
+ (in derived_name)
_
(<>.failure "derived: was given no explicit name, and cannot generate one from given information."))
@@ -76,10 +76,10 @@
#.None
(` ((~ (code.identifier poly_func)) (~+ (list\map code.identifier poly_args)))))]]
- (wrap (.list (` (def: (~+ (|export|.format export))
- (~ (code.identifier ["" name]))
- {#.implementation? #1}
- (~ impl)))))))
+ (in (.list (` (def: (~+ (|export|.format export))
+ (~ (code.identifier ["" name]))
+ {#.implementation? #1}
+ (~ impl)))))))
(def: #export (to_code env type)
(-> Env Type Code)