diff options
author | Eduardo Julian | 2019-04-17 19:37:20 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-04-17 19:37:20 -0400 |
commit | 7abfef5e4a61fb8b98fdbcedff0732442e50677b (patch) | |
tree | 89cba2652f0359331406bb795fc0d8097bb793f6 /stdlib/source/lux/macro/code.lux | |
parent | 797e49a906d850d28d94986c127a8e432ea89e40 (diff) |
- Made the "open:" and "^open" macros not generate record-patterns, and thus not need (or impose a need on) tags.
- The "do" macro for monads also doesn't need tags anymore.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/macro/code.lux | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/lux/macro/code.lux b/stdlib/source/lux/macro/code.lux index ae7ba555c..219bb76e4 100644 --- a/stdlib/source/lux/macro/code.lux +++ b/stdlib/source/lux/macro/code.lux @@ -10,9 +10,9 @@ ["." int] ["." rev] ["." frac]] - ["." text ("#;." monoid)] + ["." text ("#@." monoid)] [collection - ["." list ("#;." functor fold)]]]]) + ["." list ("#@." functor)]]]]) ## (type: (Code' w) ## (#.Bit Bit) @@ -103,14 +103,14 @@ (text.encode value) [_ (#.Tag name)] - (text;compose "#" (:: name.codec encode name)) + (text@compose "#" (:: name.codec encode name)) (^template [<tag> <open> <close>] [_ (<tag> members)] - ($_ text;compose + ($_ text@compose <open> (|> members - (list;map to-text) + (list@map to-text) (list.interpose " ") (text.join-with "")) <close>)) @@ -118,11 +118,11 @@ [#.Tuple "[" "]"]) [_ (#.Record pairs)] - ($_ text;compose + ($_ text@compose "{" (|> pairs - (list;map (function (_ [left right]) - ($_ text;compose (to-text left) " " (to-text right)))) + (list@map (function (_ [left right]) + ($_ text@compose (to-text left) " " (to-text right)))) (list.interpose " ") (text.join-with "")) "}") @@ -136,12 +136,12 @@ (case ast (^template [<tag>] [cursor (<tag> parts)] - [cursor (<tag> (list;map (replace original substitute) parts))]) + [cursor (<tag> (list@map (replace original substitute) parts))]) ([#.Form] [#.Tuple]) [cursor (#.Record parts)] - [cursor (#.Record (list;map (function (_ [left right]) + [cursor (#.Record (list@map (function (_ [left right]) [(replace original substitute left) (replace original substitute right)]) parts))] |