aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux.lux')
-rw-r--r--stdlib/source/lux.lux36
1 files changed, 9 insertions, 27 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux
index d6a399463..b84b0d096 100644
--- a/stdlib/source/lux.lux
+++ b/stdlib/source/lux.lux
@@ -700,8 +700,8 @@
## #expected (Maybe Type)
## #seed Nat
## #scope-type-vars (List Nat)
-## #extensions Nothing
-## #host Nothing})
+## #extensions Any
+## #host Any})
("lux def" Lux
(#Named ["lux" "Lux"]
(#Product ## "lux.info"
@@ -725,9 +725,9 @@
(#Product ## scope-type-vars
(#Apply Nat List)
(#Product ## extensions
- Nothing
+ Any
## "lux.host"
- Nothing))))))))))))
+ Any))))))))))))
(record$ (#Cons [(tag$ ["lux" "tags"])
(tuple$ (#Cons (text$ "info")
(#Cons (text$ "source")
@@ -5723,33 +5723,15 @@
(:: Monad<Meta> return token)
))
-(macro: #export (^~ tokens)
- {#.doc (doc "Use global definitions with simple values, such as text, int, frac and bool in place of literals in patterns."
- "The definitions must be properly-qualified (though you may use one of the short-cuts Lux provides)."
- (def: (empty?' node)
- (All [K V] (-> (Node K V) Bool))
- (case node
- (^~ (#Base ..clean-bitmap _))
- true
-
- _
- false)))}
+(macro: #export (static tokens)
(case tokens
- (^ (list& [_ (#Form (list pattern))] body branches))
+ (^ (list pattern))
(do Monad<Meta>
- [module-name current-module-name
- pattern+ (macro-expand-all pattern)]
- (case pattern+
- (^ (list pattern'))
- (do Monad<Meta>
- [pattern'' (anti-quote pattern')]
- (wrap (list& pattern'' body branches)))
-
- _
- (fail "^~ can only expand to 1 pattern.")))
+ [pattern' (anti-quote pattern)]
+ (wrap (list pattern')))
_
- (fail "Wrong syntax for ^~")))
+ (fail "Wrong syntax for \"static\".")))
(type: Multi-Level-Case
[Code (List [Code Code])])