aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-08-30 19:33:36 -0400
committerEduardo Julian2022-08-30 19:33:36 -0400
commitd0e4ba8124345ce990de7fdf7497dd903de6c342 (patch)
treee8cc8f5e41615ca9ca536f71ddec8aca7f882a6c /stdlib/source/library/lux.lux
parentb135e487e8f705a5fea7b9ef785310572642063a (diff)
Got rid of the superfluous "lux macro" extension.
Diffstat (limited to 'stdlib/source/library/lux.lux')
-rw-r--r--stdlib/source/library/lux.lux154
1 files changed, 81 insertions, 73 deletions
diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux
index df7b4ef66..f35ba4250 100644
--- a/stdlib/source/library/lux.lux
+++ b/stdlib/source/library/lux.lux
@@ -732,52 +732,54 @@
#0)
("lux def" let''
- ("lux macro"
- ([_ tokens]
- ({{#Item lhs {#Item rhs {#Item body {#End}}}}
- (meta#in {#Item (form$ {#Item (variant$ {#Item lhs {#Item body {#End}}})
- {#Item rhs {#End}}})
- {#End}})
-
- _
- (failure "Wrong syntax for let''")}
- tokens)))
+ ("lux type as" Macro
+ ("lux type check" Macro'
+ ([_ tokens]
+ ({{#Item lhs {#Item rhs {#Item body {#End}}}}
+ (meta#in {#Item (form$ {#Item (variant$ {#Item lhs {#Item body {#End}}})
+ {#Item rhs {#End}}})
+ {#End}})
+
+ _
+ (failure "Wrong syntax for let''")}
+ tokens))))
#0)
("lux def" function''
- ("lux macro"
- ([_ tokens]
- ({{#Item [_ {#Tuple {#Item arg args'}}] {#Item body {#End}}}
- (meta#in {#Item (_ann {#Form {#Item (_ann {#Tuple {#Item (_ann {#Symbol ["" ""]})
- {#Item arg {#End}}}})
- {#Item ({{#End}
- body
-
- _
- (_ann {#Form {#Item (_ann {#Symbol [..prelude "function''"]})
- {#Item (_ann {#Tuple args'})
- {#Item body {#End}}}}})}
- args')
- {#End}}}})
- {#End}})
-
- {#Item [_ {#Symbol ["" self]}] {#Item [_ {#Tuple {#Item arg args'}}] {#Item body {#End}}}}
- (meta#in {#Item (_ann {#Form {#Item (_ann {#Tuple {#Item (_ann {#Symbol ["" self]})
- {#Item arg {#End}}}})
- {#Item ({{#End}
- body
-
- _
- (_ann {#Form {#Item (_ann {#Symbol [..prelude "function''"]})
- {#Item (_ann {#Tuple args'})
- {#Item body {#End}}}}})}
- args')
- {#End}}}})
- {#End}})
-
- _
- (failure "Wrong syntax for function''")}
- tokens)))
+ ("lux type as" Macro
+ ("lux type check" Macro'
+ ([_ tokens]
+ ({{#Item [_ {#Tuple {#Item arg args'}}] {#Item body {#End}}}
+ (meta#in {#Item (_ann {#Form {#Item (_ann {#Tuple {#Item (_ann {#Symbol ["" ""]})
+ {#Item arg {#End}}}})
+ {#Item ({{#End}
+ body
+
+ _
+ (_ann {#Form {#Item (_ann {#Symbol [..prelude "function''"]})
+ {#Item (_ann {#Tuple args'})
+ {#Item body {#End}}}}})}
+ args')
+ {#End}}}})
+ {#End}})
+
+ {#Item [_ {#Symbol ["" self]}] {#Item [_ {#Tuple {#Item arg args'}}] {#Item body {#End}}}}
+ (meta#in {#Item (_ann {#Form {#Item (_ann {#Tuple {#Item (_ann {#Symbol ["" self]})
+ {#Item arg {#End}}}})
+ {#Item ({{#End}
+ body
+
+ _
+ (_ann {#Form {#Item (_ann {#Symbol [..prelude "function''"]})
+ {#Item (_ann {#Tuple args'})
+ {#Item body {#End}}}}})}
+ args')
+ {#End}}}})
+ {#End}})
+
+ _
+ (failure "Wrong syntax for function''")}
+ tokens))))
#0)
("lux def" as_def
@@ -808,42 +810,48 @@
("lux def" as_macro
("lux type check" {#Function Code Code}
(function'' [expression]
- (form$ {#Item (text$ "lux macro")
- {#Item expression
- {#End}}})))
+ (form$ {#Item (text$ "lux type as")
+ {#Item (symbol$ [..prelude "Macro"])
+ {#Item (form$ {#Item (text$ "lux type check")
+ {#Item (symbol$ [..prelude "Macro'"])
+ {#Item expression
+ {#End}}}})
+ {#End}}}})))
#0)
("lux def" def'
- ("lux macro"
- (function'' [tokens]
- ({{#Item [export_policy
- {#Item [[_ {#Form {#Item [name args]}}]
- {#Item [type {#Item [body {#End}]}]}]}]}
- (meta#in {#Item [(as_def name
- (as_checked type (as_function name args body))
- export_policy)
- {#End}]})
-
- {#Item [export_policy {#Item [name {#Item [type {#Item [body {#End}]}]}]}]}
- (meta#in {#Item [(as_def name (as_checked type body)
- export_policy)
- {#End}]})
-
- _
- (failure "Wrong syntax for def'")}
- tokens)))
+ ("lux type as" Macro
+ ("lux type check" Macro'
+ (function'' [tokens]
+ ({{#Item [export_policy
+ {#Item [[_ {#Form {#Item [name args]}}]
+ {#Item [type {#Item [body {#End}]}]}]}]}
+ (meta#in {#Item [(as_def name
+ (as_checked type (as_function name args body))
+ export_policy)
+ {#End}]})
+
+ {#Item [export_policy {#Item [name {#Item [type {#Item [body {#End}]}]}]}]}
+ (meta#in {#Item [(as_def name (as_checked type body)
+ export_policy)
+ {#End}]})
+
+ _
+ (failure "Wrong syntax for def'")}
+ tokens))))
#0)
("lux def" macro
- ("lux macro"
- (function'' [tokens]
- ({{#Item [_ {#Form {#Item name {#Item head tail}}}] {#Item body {#End}}}
- (meta#in {#Item (as_macro (as_function name {#Item head tail} body))
- {#End}})
-
- _
- (failure (wrong_syntax_error [..prelude "macro"]))}
- tokens)))
+ ("lux type as" Macro
+ ("lux type check" Macro'
+ (function'' [tokens]
+ ({{#Item [_ {#Form {#Item name {#Item head tail}}}] {#Item body {#End}}}
+ (meta#in {#Item (as_macro (as_function name {#Item head tail} body))
+ {#End}})
+
+ _
+ (failure (wrong_syntax_error [..prelude "macro"]))}
+ tokens))))
#1)
(def' .public comment