diff options
Diffstat (limited to 'stdlib/source/library/lux/macro/poly.lux')
-rw-r--r-- | stdlib/source/library/lux/macro/poly.lux | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/stdlib/source/library/lux/macro/poly.lux b/stdlib/source/library/lux/macro/poly.lux index 5ce420e7a..b40f29a8c 100644 --- a/stdlib/source/library/lux/macro/poly.lux +++ b/stdlib/source/library/lux/macro/poly.lux @@ -6,9 +6,9 @@ [abstract ["." monad (#+ do)]] [control - ["p" parser + ["<>" parser ["<.>" type (#+ Env)] - ["s" code]]] + ["<.>" code]]] [data ["." product] ["." maybe] @@ -25,15 +25,15 @@ ["n" nat]]]]]) (syntax: #export (poly: {export |export|.parser} - {name s.local_identifier} + {name <code>.local_identifier} body) (with_gensyms [g!_ g!type g!output] (let [g!name (code.identifier ["" name])] - (wrap (.list (` ((~! syntax:) (~+ (|export|.format export)) ((~ g!name) {(~ g!type) (~! s.identifier)}) + (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) ((~! p.rec) + ((~! <type>.run) ((~! <>.rec) (function ((~ g!_) (~ g!name)) (~ body))) (~ g!type))) @@ -54,9 +54,9 @@ #.None)) (syntax: #export (derived: {export |export|.parser} - {?name (p.maybe s.local_identifier)} - {[poly_func poly_args] (s.form (p.and s.identifier (p.many s.identifier)))} - {?custom_impl (p.maybe s.any)}) + {?name (<>.maybe <code>.local_identifier)} + {[poly_func poly_args] (<code>.form (<>.and <code>.identifier (<>.many <code>.identifier)))} + {?custom_impl (<>.maybe <code>.any)}) (do {! meta.monad} [poly_args (monad.map ! meta.normalize poly_args) name (case ?name @@ -64,12 +64,12 @@ (wrap name) (^multi #.None - [(derivation_name (product.right poly_func) (list\map product.right poly_args)) - (#.Some derived_name)]) + {(derivation_name (product.right poly_func) (list\map product.right poly_args)) + (#.Some derived_name)}) (wrap derived_name) _ - (p.fail "derived: was given no explicit name, and cannot generate one from given information.")) + (<>.fail "derived: was given no explicit name, and cannot generate one from given information.")) #let [impl (case ?custom_impl (#.Some custom_impl) custom_impl @@ -114,8 +114,8 @@ (^template [<macro> <tag> <flattener>] [(<tag> left right) (` (<macro> (~+ (list\map (to_code env) (<flattener> type)))))]) - ([| #.Sum type.flatten_variant] - [& #.Product type.flatten_tuple]) + ([| #.Sum type.flat_variant] + [& #.Product type.flat_tuple]) (#.Named name sub_type) (code.identifier name) |