aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/macro.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/macro.lux')
-rw-r--r--stdlib/source/library/lux/macro.lux18
1 files changed, 9 insertions, 9 deletions
diff --git a/stdlib/source/library/lux/macro.lux b/stdlib/source/library/lux/macro.lux
index 91025dcaf..193b5a25e 100644
--- a/stdlib/source/library/lux/macro.lux
+++ b/stdlib/source/library/lux/macro.lux
@@ -18,7 +18,7 @@
["#" meta
["." location]]])
-(def: #export (single_expansion syntax)
+(def: .public (single_expansion syntax)
{#.doc (doc "Given code that requires applying a macro, does it once and returns the result."
"Otherwise, returns the code as-is.")}
(-> Code (Meta (List Code)))
@@ -36,7 +36,7 @@
_
(\ //.monad in (list syntax))))
-(def: #export (expansion syntax)
+(def: .public (expansion syntax)
{#.doc (doc "Given code that requires applying a macro, expands repeatedly until no more direct macro-calls are left."
"Otherwise, returns the code as-is.")}
(-> Code (Meta (List Code)))
@@ -58,7 +58,7 @@
_
(\ //.monad in (list syntax))))
-(def: #export (full_expansion syntax)
+(def: .public (full_expansion syntax)
{#.doc "Expands all macro-calls everywhere recursively, until only primitive/base code remains."}
(-> Code (Meta (List Code)))
(case syntax
@@ -106,7 +106,7 @@
_
(\ //.monad in (list syntax))))
-(def: #export (gensym prefix)
+(def: .public (gensym prefix)
{#.doc (doc "Generates a unique name as an Code node (ready to be used in code templates)."
"A prefix can be given (or just be empty text) to better identify the code for debugging purposes.")}
(-> Text (Meta Code))
@@ -126,14 +126,14 @@
_
(//.failure (text\compose "Code is not a local identifier: " (code.format ast)))))
-(def: #export wrong_syntax_error
+(def: .public wrong_syntax_error
(-> Name Text)
(|>> name\encode
(text\compose "Wrong syntax for ")))
-(macro: #export (with_gensyms tokens)
+(macro: .public (with_gensyms tokens)
{#.doc (doc "Creates new identifiers and offers them to the body expression."
- (syntax: #export (synchronized lock body)
+ (syntax: .public (synchronized lock body)
(with_gensyms [g!lock g!body g!_]
(in (list (` (let [(~ g!lock) (~ lock)
(~ g!_) ("jvm monitorenter" (~ g!lock))
@@ -155,7 +155,7 @@
_
(//.failure (..wrong_syntax_error (name_of ..with_gensyms)))))
-(def: #export (one_expansion token)
+(def: .public (one_expansion token)
{#.doc "Works just like expand, except that it ensures that the output is a single Code token."}
(-> Code (Meta Code))
(do //.monad
@@ -168,7 +168,7 @@
(//.failure "Macro expanded to more than 1 element."))))
(template [<macro> <func>]
- [(macro: #export (<macro> tokens)
+ [(macro: .public (<macro> tokens)
{#.doc (doc "Performs a macro-expansion and logs the resulting code."
"You can either use the resulting code, or omit them."
"By omitting them, this macro produces nothing (just like the lux.comment macro)."