aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-02-16 02:32:09 -0400
committerEduardo Julian2022-02-16 02:32:09 -0400
commitb68f2b6aead6224c14902c80fc00c27705eece6c (patch)
tree69fae48b3cf5ad137ea3ad1e03d490a445f4ef91 /stdlib/source/library/lux.lux
parent8b6d474dd5d2b323d1dba29359460af4708402ea (diff)
FIXED generating artifact IDs in the context of "lux in-module".
Diffstat (limited to 'stdlib/source/library/lux.lux')
-rw-r--r--stdlib/source/library/lux.lux222
1 files changed, 111 insertions, 111 deletions
diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux
index 75575ebe4..69f555fee 100644
--- a/stdlib/source/library/lux.lux
+++ b/stdlib/source/library/lux.lux
@@ -676,7 +676,7 @@
.public)
... Base functions & macros
-("lux def" in_meta
+("lux def" meta#in
("lux type check"
{#UnivQ {#End}
{#Function {#Parameter 1}
@@ -706,7 +706,7 @@
("lux macro"
([_ tokens]
({{#Item lhs {#Item rhs {#Item body {#End}}}}
- (in_meta {#Item (form$ {#Item (variant$ {#Item lhs {#Item body {#End}}})
+ (meta#in {#Item (form$ {#Item (variant$ {#Item lhs {#Item body {#End}}})
{#Item rhs {#End}}})
{#End}})
@@ -719,7 +719,7 @@
("lux macro"
([_ tokens]
({{#Item [_ {#Tuple {#Item arg args'}}] {#Item body {#End}}}
- (in_meta {#Item (_ann {#Form {#Item (_ann {#Tuple {#Item (_ann {#Symbol ["" ""]})
+ (meta#in {#Item (_ann {#Form {#Item (_ann {#Tuple {#Item (_ann {#Symbol ["" ""]})
{#Item arg {#End}}}})
{#Item ({{#End}
body
@@ -733,7 +733,7 @@
{#End}})
{#Item [_ {#Symbol ["" self]}] {#Item [_ {#Tuple {#Item arg args'}}] {#Item body {#End}}}}
- (in_meta {#Item (_ann {#Form {#Item (_ann {#Tuple {#Item (_ann {#Symbol ["" self]})
+ (meta#in {#Item (_ann {#Form {#Item (_ann {#Tuple {#Item (_ann {#Symbol ["" self]})
{#Item arg {#End}}}})
{#Item ({{#End}
body
@@ -786,13 +786,13 @@
({{#Item [export_policy
{#Item [[_ {#Form {#Item [name args]}}]
{#Item [type {#Item [body {#End}]}]}]}]}
- (in_meta {#Item [(as_def name
+ (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}]}]}]}]}
- (in_meta {#Item [(as_def name (as_checked type body)
+ (meta#in {#Item [(as_def name (as_checked type body)
export_policy)
{#End}]})
@@ -805,7 +805,7 @@
("lux macro"
(function'' [tokens]
({{#Item export_policy {#Item [_ {#Form {#Item name args}}] {#Item body {#End}}}}
- (in_meta {#Item (as_def name (as_macro (as_function name args body))
+ (meta#in {#Item (as_def name (as_macro (as_function name args body))
export_policy)
{#End}})
@@ -815,14 +815,14 @@
#0)
(macro:' .public (comment tokens)
- (in_meta {#End}))
+ (meta#in {#End}))
(macro:' .private ($' tokens)
({{#Item x {#End}}
- (in_meta tokens)
+ (meta#in tokens)
{#Item x {#Item y xs}}
- (in_meta {#Item (form$ {#Item (symbol$ [..prelude_module "$'"])
+ (meta#in {#Item (form$ {#Item (symbol$ [..prelude_module "$'"])
{#Item (variant$ {#Item (symbol$ [..prelude_module "#Apply"])
{#Item y {#Item x {#End}}}})
xs}})
@@ -1147,7 +1147,7 @@
(macro:' .public (-> tokens)
({{#Item output inputs}
- (in_meta {#Item (list#mix ("lux type check" {#Function Code {#Function Code Code}}
+ (meta#in {#Item (list#mix ("lux type check" {#Function Code {#Function Code Code}}
(function'' [i o] (variant$ {#Item (symbol$ [..prelude_module "#Function"]) {#Item i {#Item o {#End}}}})))
output
inputs)
@@ -1158,12 +1158,12 @@
(list#reversed tokens)))
(macro:' .public (list xs)
- (in_meta {#Item (list#mix |#Item| |#End| (list#reversed xs))
+ (meta#in {#Item (list#mix |#Item| |#End| (list#reversed xs))
{#End}}))
(macro:' .public (list& xs)
({{#Item last init}
- (in_meta (list (list#mix |#Item| last init)))
+ (meta#in (list (list#mix |#Item| last init)))
_
(failure "Wrong syntax for list&")}
@@ -1171,20 +1171,20 @@
(macro:' .public (Union tokens)
({{#End}
- (in_meta (list (symbol$ [..prelude_module "Nothing"])))
+ (meta#in (list (symbol$ [..prelude_module "Nothing"])))
{#Item last prevs}
- (in_meta (list (list#mix (function'' [left right] (variant$ (list (symbol$ [..prelude_module "#Sum"]) left right)))
+ (meta#in (list (list#mix (function'' [left right] (variant$ (list (symbol$ [..prelude_module "#Sum"]) left right)))
last
prevs)))}
(list#reversed tokens)))
(macro:' .public (Tuple tokens)
({{#End}
- (in_meta (list (symbol$ [..prelude_module "Any"])))
+ (meta#in (list (symbol$ [..prelude_module "Any"])))
{#Item last prevs}
- (in_meta (list (list#mix (function'' [left right] (variant$ (list (symbol$ [..prelude_module "#Product"]) left right)))
+ (meta#in (list (list#mix (function'' [left right] (variant$ (list (symbol$ [..prelude_module "#Product"]) left right)))
last
prevs)))}
(list#reversed tokens)))
@@ -1201,7 +1201,7 @@
(failure "function' requires a non-empty arguments tuple.")
{#Item [harg targs]}
- (in_meta (list (form$ (list (tuple$ (list (local_symbol$ name)
+ (meta#in (list (form$ (list (tuple$ (list (local_symbol$ name)
harg))
(list#mix (function'' [arg body']
(form$ (list (tuple$ (list (local_symbol$ "")
@@ -1219,7 +1219,7 @@
({{#Item [export_policy
{#Item [[_ {#Form {#Item [name args]}}]
{#Item [type {#Item [body {#End}]}]}]}]}
- (in_meta (list (form$ (list (text$ "lux def")
+ (meta#in (list (form$ (list (text$ "lux def")
name
(form$ (list (text$ "lux type check")
type
@@ -1230,7 +1230,7 @@
export_policy))))
{#Item [export_policy {#Item [name {#Item [type {#Item [body {#End}]}]}]}]}
- (in_meta (list (form$ (list (text$ "lux def")
+ (meta#in (list (form$ (list (text$ "lux def")
name
(form$ (list (text$ "lux type check")
type
@@ -1269,7 +1269,7 @@
(macro:' .private (let' tokens)
({{#Item [_ {#Tuple bindings}] {#Item body {#End}}}
({{#Some bindings}
- (in_meta (list (list#mix ("lux type check" (-> (Tuple Code Code) Code
+ (meta#in (list (list#mix ("lux type check" (-> (Tuple Code Code) Code
Code)
(function' [binding body]
({[label value]
@@ -1336,7 +1336,7 @@
(macro:' .public (_$ tokens)
({{#Item op tokens'}
({{#Item first nexts}
- (in_meta (list (list#mix (function#flipped (right_associativity op)) first nexts)))
+ (meta#in (list (list#mix (function#flipped (right_associativity op)) first nexts)))
_
(failure "Wrong syntax for _$")}
@@ -1349,7 +1349,7 @@
(macro:' .public ($_ tokens)
({{#Item op tokens'}
({{#Item last prevs}
- (in_meta (list (list#mix (right_associativity op) last prevs)))
+ (meta#in (list (list#mix (right_associativity op) last prevs)))
_
(failure "Wrong syntax for $_")}
@@ -1431,7 +1431,7 @@
var))))
body
(list#reversed bindings))]
- (in_meta (list (form$ (list (variant$ (list (tuple$ (list (symbol$ [..prelude_module "#in"]) g!in
+ (meta#in (list (form$ (list (variant$ (list (tuple$ (list (symbol$ [..prelude_module "#in"]) g!in
(symbol$ [..prelude_module "#then"]) g!then))
body'))
monad)))))
@@ -1480,7 +1480,7 @@
(macro:' .public (if tokens)
({{#Item test {#Item then {#Item else {#End}}}}
- (in_meta (list (form$ (list (variant$ (list (bit$ #1) then
+ (meta#in (list (form$ (list (variant$ (list (bit$ #1) then
(bit$ #0) else))
test))))
@@ -1567,7 +1567,7 @@
(def:''' .private (spliced replace? untemplated elems)
(-> Bit (-> Code ($' Meta Code)) ($' List Code) ($' Meta Code))
({[#1] ({{#End}
- (in_meta |#End|)
+ (meta#in |#End|)
{#Item lastI inits}
(do meta_monad
@@ -1607,22 +1607,22 @@
(def:''' .private (untemplated replace? subst token)
(-> Bit Text Code ($' Meta Code))
({[_ [_ {#Bit value}]]
- (in_meta (with_location (variant$ (list (symbol$ [..prelude_module "#Bit"]) (bit$ value)))))
+ (meta#in (with_location (variant$ (list (symbol$ [..prelude_module "#Bit"]) (bit$ value)))))
[_ [_ {#Nat value}]]
- (in_meta (with_location (variant$ (list (symbol$ [..prelude_module "#Nat"]) (nat$ value)))))
+ (meta#in (with_location (variant$ (list (symbol$ [..prelude_module "#Nat"]) (nat$ value)))))
[_ [_ {#Int value}]]
- (in_meta (with_location (variant$ (list (symbol$ [..prelude_module "#Int"]) (int$ value)))))
+ (meta#in (with_location (variant$ (list (symbol$ [..prelude_module "#Int"]) (int$ value)))))
[_ [_ {#Rev value}]]
- (in_meta (with_location (variant$ (list (symbol$ [..prelude_module "#Rev"]) (rev$ value)))))
+ (meta#in (with_location (variant$ (list (symbol$ [..prelude_module "#Rev"]) (rev$ value)))))
[_ [_ {#Frac value}]]
- (in_meta (with_location (variant$ (list (symbol$ [..prelude_module "#Frac"]) (frac$ value)))))
+ (meta#in (with_location (variant$ (list (symbol$ [..prelude_module "#Frac"]) (frac$ value)))))
[_ [_ {#Text value}]]
- (in_meta (untemplated_text value))
+ (meta#in (untemplated_text value))
[#1 [_ {#Symbol [module name]}]]
(do meta_monad
@@ -1635,13 +1635,13 @@
(in [module name])}
module)
.let' [[module name] real_name]]
- (in_meta (with_location (variant$ (list (symbol$ [..prelude_module "#Symbol"]) (tuple$ (list (text$ module) (text$ name))))))))
+ (meta#in (with_location (variant$ (list (symbol$ [..prelude_module "#Symbol"]) (tuple$ (list (text$ module) (text$ name))))))))
[#0 [_ {#Symbol [module name]}]]
- (in_meta (with_location (variant$ (list (symbol$ [..prelude_module "#Symbol"]) (tuple$ (list (text$ module) (text$ name)))))))
+ (meta#in (with_location (variant$ (list (symbol$ [..prelude_module "#Symbol"]) (tuple$ (list (text$ module) (text$ name)))))))
[#1 [_ {#Form {#Item [[_ {#Symbol ["" "~"]}] {#Item [unquoted {#End}]}]}}]]
- (in_meta (form$ (list (text$ "lux type check")
+ (meta#in (form$ (list (text$ "lux type check")
(symbol$ [..prelude_module "Code"])
unquoted)))
@@ -1677,10 +1677,10 @@
(macro:' .public (Primitive tokens)
({{#Item [_ {#Text class_name}] {#End}}
- (in_meta (list (variant$ (list (symbol$ [..prelude_module "#Primitive"]) (text$ class_name) |#End|))))
+ (meta#in (list (variant$ (list (symbol$ [..prelude_module "#Primitive"]) (text$ class_name) |#End|))))
{#Item [_ {#Text class_name}] {#Item [_ {#Tuple params}] {#End}}}
- (in_meta (list (variant$ (list (symbol$ [..prelude_module "#Primitive"]) (text$ class_name) (untemplated_list params)))))
+ (meta#in (list (variant$ (list (symbol$ [..prelude_module "#Primitive"]) (text$ class_name) (untemplated_list params)))))
_
(failure "Wrong syntax for Primitive")}
@@ -1735,7 +1735,7 @@
(macro:' .public (|> tokens)
({{#Item [init apps]}
- (in_meta (list (list#mix ("lux type check" (-> Code Code Code)
+ (meta#in (list (list#mix ("lux type check" (-> Code Code Code)
(function' [app acc]
({[_ {#Variant parts}]
(variant$ (list#composite parts (list acc)))
@@ -1758,7 +1758,7 @@
(macro:' .public (<| tokens)
({{#Item [init apps]}
- (in_meta (list (list#mix ("lux type check" (-> Code Code Code)
+ (meta#in (list (list#mix ("lux type check" (-> Code Code Code)
(function' [app acc]
({[_ {#Variant parts}]
(variant$ (list#composite parts (list acc)))
@@ -1879,7 +1879,7 @@
(|> data'
(list#each (function#composite apply (replacement_environment bindings')))
list#conjoint
- in_meta)
+ meta#in)
(failure "Irregular arguments tuples for template.")))
_
@@ -2026,7 +2026,7 @@
(in [module_name name]))
_
- (in_meta name)}
+ (meta#in name)}
name))
(def:''' .private (macro' full_name)
@@ -2079,7 +2079,7 @@
?macro))
_
- (in_meta (list token))}
+ (meta#in (list token))}
token))
(def:''' .private (expansion token)
@@ -2099,7 +2099,7 @@
?macro))
_
- (in_meta (list token))}
+ (meta#in (list token))}
token))
(def:''' .private (full_expansion' full_expansion name args)
@@ -2192,7 +2192,7 @@
(in (list (tuple$ (list#conjoint members')))))
_
- (in_meta (list syntax))}
+ (meta#in (list syntax))}
syntax)))
(def:''' .private (text#encoded original)
@@ -2310,7 +2310,7 @@
(macro:' .public (: tokens)
({{#Item type {#Item value {#End}}}
- (in_meta (list (` ("lux type check"
+ (meta#in (list (` ("lux type check"
(..type (~ type))
(~ value)))))
@@ -2320,7 +2320,7 @@
(macro:' .public (:as tokens)
({{#Item type {#Item value {#End}}}
- (in_meta (list (` ("lux type as"
+ (meta#in (list (` ("lux type as"
(..type (~ type))
(~ value)))))
@@ -2363,7 +2363,7 @@
(macro:' .public (exec tokens)
({{#Item value actions}
(let' [dummy (local_symbol$ "")]
- (in_meta (list (list#mix ("lux type check" (-> Code Code Code)
+ (meta#in (list (list#mix ("lux type check" (-> Code Code Code)
(function' [pre post] (` ({(~ dummy) (~ post)}
(~ pre)))))
value
@@ -2403,7 +2403,7 @@
{#None}
body'}
?type)]
- (in_meta (list (` ("lux def" (~ name)
+ (meta#in (list (` ("lux def" (~ name)
(~ body'')
(~ export_policy))))))
@@ -2480,7 +2480,7 @@
(let' [pairs (|> patterns
(list#each (function' [pattern] (list pattern body)))
(list#conjoint))]
- (in_meta (list#composite pairs branches))))
+ (meta#in (list#composite pairs branches))))
_
(failure "Wrong syntax for ^or")))
@@ -2508,7 +2508,7 @@
(` (case (~ r) (~ l) (~ body')))))))
body)
list
- in_meta)
+ meta#in)
{#None}
(failure "let requires an even number of parts"))
@@ -2533,7 +2533,7 @@
(` ([(~ g!name) (~ arg)] (~ body')))
(` ([(~ g!name) (~ g!blank)]
(.case (~ g!blank) (~ arg) (~ body'))))))))]
- (in_meta (list (nest (..local_symbol$ g!name) head
+ (meta#in (list (nest (..local_symbol$ g!name) head
(list#mix (nest g!blank) body (list#reversed tail))))))
{#None}
@@ -2741,7 +2741,7 @@
{#None}
body)]
- (in_meta (list (` ("lux def" (~ (..local_symbol$ name))
+ (meta#in (list (` ("lux def" (~ (..local_symbol$ name))
(~ body)
(~ export_policy))))))
@@ -2769,7 +2769,7 @@
_
(` ("lux macro"
(function ((~ name) (~+ (list#each local_symbol$ args))) (~ body)))))]
- (in_meta (list (` ("lux def" (~ name)
+ (meta#in (list (` ("lux def" (~ name)
(~ body)
(~ export_policy))))))
@@ -2795,7 +2795,7 @@
[(macro: .public (<name> tokens)
(case (list#reversed tokens)
(^ (list& last init))
- (in_meta (list (list#mix (: (-> Code Code Code)
+ (meta#in (list (list#mix (: (-> Code Code Code)
(function (_ pre post) (` <form>)))
last
init)))
@@ -2999,7 +2999,7 @@
..#module_state _] =module]]
(case (plist#value name definitions)
{#Some {#Slot [exported type group index]}}
- (in_meta [index
+ (meta#in [index
(list#each (function (_ slot)
[module slot])
group)
@@ -3033,18 +3033,18 @@
{#Some {#Type [exported? {#Named _ _type} {#Right slots}]}}
(case (interface_methods _type)
{#Some members}
- (in_meta {#Some [(list#each (function (_ slot) [module slot])
+ (meta#in {#Some [(list#each (function (_ slot) [module slot])
{#Item slots})
members]})
_
- (in_meta {#None}))
+ (meta#in {#None}))
_
(record_slots unnamed)))
_
- (in_meta {#None})))
+ (meta#in {#None})))
(def: expected_type
(Meta Type)
@@ -3114,7 +3114,7 @@
tags (: (Meta (List Symbol))
(case tags+type
{#Some [tags _]}
- (in_meta tags)
+ (meta#in tags)
_
(failure ($_ text#composite
@@ -3182,7 +3182,7 @@
_
(` ((~ (local_symbol$ name)) (~+ args))))]
- (in_meta (list (` (..def: (~ export_policy) (~ usage)
+ (meta#in (list (` (..def: (~ export_policy) (~ usage)
(~ type)
(..implementation
(~+ definitions)))))))
@@ -3230,7 +3230,7 @@
(macro: .public (Variant tokens)
(case (everyP caseP tokens)
{#Some cases}
- (in_meta (list (` (..Union (~+ (list#each product#right cases))))
+ (meta#in (list (` (..Union (~+ (list#each product#right cases))))
(variant$ (list#each (function (_ case)
(text$ (product#left case)))
cases))))
@@ -3252,7 +3252,7 @@
(^ (list [_ {#Tuple record}]))
(case (everyP slotP record)
{#Some slots}
- (in_meta (list (` (..Tuple (~+ (list#each product#right slots))))
+ (meta#in (list (` (..Tuple (~+ (list#each product#right slots))))
(tuple$ (list#each (function (_ slot)
(text$ (product#left slot)))
slots))))
@@ -3291,7 +3291,7 @@
(^ (list type [_ {#Variant tags}]))
(case (everyP textP tags)
{#Some tags}
- (in_meta [type {#Some {#Left tags}}])
+ (meta#in [type {#Some {#Left tags}}])
{#None}
(failure "Improper type-definition syntax"))
@@ -3299,19 +3299,19 @@
(^ (list type [_ {#Tuple slots}]))
(case (everyP textP slots)
{#Some slots}
- (in_meta [type {#Some {#Right slots}}])
+ (meta#in [type {#Some {#Right slots}}])
{#None}
(failure "Improper type-definition syntax"))
(^ (list type))
- (in_meta [it {#None}])
+ (meta#in [it {#None}])
_
(failure "Improper type-definition syntax")))
type
- (in_meta [type {#None}])}
+ (meta#in [type {#None}])}
it))
(macro: .public (type: tokens)
@@ -3335,7 +3335,7 @@
(let [typeC (` {.#Named [(~ (text$ module_name))
(~ (text$ name))]
(.type (~ type''))})]
- (in_meta (list (case labels??
+ (meta#in (list (case labels??
{#Some labels}
(` ("lux def type tagged" (~ type_name)
(~ typeC)
@@ -3399,7 +3399,7 @@
(function (_ def)
(case def
[_ {#Symbol ["" name]}]
- (in_meta name)
+ (meta#in name)
_
(failure "only/+ and exclude/- require symbols."))))
@@ -3422,20 +3422,20 @@
(^or (^ (list& [_ {#Text "*"}] tokens'))
(^ (list& [_ {#Text "all"}] tokens')))
- (in_meta [{#All} tokens'])
+ (meta#in [{#All} tokens'])
(^or (^ (list& [_ {#Text "_"}] tokens'))
(^ (list& [_ {#Text "ignore"}] tokens')))
- (in_meta [{#Ignore} tokens'])
+ (meta#in [{#Ignore} tokens'])
_
- (in_meta [{#Nothing} tokens])))
+ (meta#in [{#Nothing} tokens])))
(def: (openings_parser parts)
(-> (List Code) (Meta [(List Openings) (List Code)]))
(case parts
{#End}
- (in_meta [{#End} {#End}])
+ (meta#in [{#End} {#End}])
(^ (list& [_ {#Form (list& [_ {#Text prefix}] structs)}] parts'))
(do meta_monad
@@ -3443,18 +3443,18 @@
(function (_ struct)
(case struct
[_ {#Symbol ["" struct_name]}]
- (in_meta struct_name)
+ (meta#in struct_name)
_
(failure "Expected all implementations of opening form to be symbols.")))
structs)
next+remainder (openings_parser parts')]
(let [[next remainder] next+remainder]
- (in_meta [{#Item [prefix structs'] next}
+ (meta#in [{#Item [prefix structs'] next}
remainder])))
_
- (in_meta [{#End} parts])))
+ (meta#in [{#End} parts])))
(def: (text#split_at' at x)
(-> Nat Text [Text Text])
@@ -3546,7 +3546,7 @@
(-> Bit Text Text (Meta Text))
(case (relative_ups 0 module)
0
- (in_meta (if nested?
+ (meta#in (if nested?
($_ "lux text concat" relative_root ..module_separator module)
module))
@@ -3563,7 +3563,7 @@
output (case ("lux text size" clean)
0 prefix
_ ($_ text#composite prefix ..module_separator clean))]
- (in_meta output))
+ (meta#in output))
(failure ($_ "lux text concat"
"Cannot climb the module hierarchy..." \n
"Importing module: " module \n
@@ -3939,10 +3939,10 @@
(^ (list& else branches'))
(case (pairs branches')
{#Some branches'}
- (in_meta (list (list#mix (: (-> [Code Code] Code Code)
+ (meta#in (list (list#mix (: (-> [Code Code] Code Code)
(function (_ branch else)
- (let [[right left] branch]
- (` (if (~ left) (~ right) (~ else))))))
+ (let [[then ?] branch]
+ (` (if (~ ?) (~ then) (~ else))))))
else
branches')))
@@ -3987,13 +3987,13 @@
g!_)))))
list#conjoint
tuple$)]
- (in_meta (list (` ({(~ pattern) (~ g!output)} (~ record))))))
+ (meta#in (list (` ({(~ pattern) (~ g!output)} (~ record))))))
_
(failure "value@ can only use records.")))
(^ (list [_ {#Tuple slots}] record))
- (in_meta (list (list#mix (: (-> Code Code Code)
+ (meta#in (list (list#mix (: (-> Code Code Code)
(function (_ slot inner)
(` (..value@ (~ slot) (~ inner)))))
record
@@ -4030,10 +4030,10 @@
(function (_ [sub_tag_index sname stype])
(open_declaration alias tags' sub_tag_index sname source+ stype)))
(enumeration (zipped/2 tags' members')))]
- (in_meta (list#conjoint decls')))
+ (meta#in (list#conjoint decls')))
_
- (in_meta (list (` ("lux def" (~ (local_symbol$ (..module_alias (list short) alias)))
+ (meta#in (list (` ("lux def" (~ (local_symbol$ (..module_alias (list short) alias)))
(~ source+)
#0)))))))
@@ -4053,7 +4053,7 @@
(function (_ [tag_index sname stype])
(open_declaration alias tags tag_index sname source stype)))
(enumeration (zipped/2 tags members)))]
- (in_meta (list#conjoint decls')))
+ (meta#in (list#conjoint decls')))
_
(failure (text#composite "Can only 'open:' structs: " (type#encoded struct_type)))))
@@ -4061,7 +4061,7 @@
_
(do meta_monad
[g!struct (..generated_symbol "struct")]
- (in_meta (list (` ("lux def" (~ g!struct) (~ struct) #0))
+ (meta#in (list (` ("lux def" (~ g!struct) (~ struct) #0))
(` (..open: (~ (text$ alias)) (~ g!struct)))))))
_
@@ -4071,13 +4071,13 @@
(do meta_monad
[g!_ (..generated_symbol "_")
g!arg (..generated_symbol "arg")]
- (in_meta (list (` (function ((~ g!_) (~ g!arg)) (|> (~ g!arg) (~+ tokens))))))))
+ (meta#in (list (` (function ((~ g!_) (~ g!arg)) (|> (~ g!arg) (~+ tokens))))))))
(macro: .public (<<| tokens)
(do meta_monad
[g!_ (..generated_symbol "_")
g!arg (..generated_symbol "arg")]
- (in_meta (list (` (function ((~ g!_) (~ g!arg)) (<| (~+ tokens) (~ g!arg))))))))
+ (meta#in (list (` (function ((~ g!_) (~ g!arg)) (<| (~+ tokens) (~ g!arg))))))))
(def: (imported_by? import_name module_name)
(-> Text Text (Meta Bit))
@@ -4116,7 +4116,7 @@
(: (-> Text (Meta Any))
(function (_ _def)
(if (is_member? all_defs _def)
- (in_meta [])
+ (meta#in [])
(failure ($_ text#composite _def " is not defined in module " module_name " @ " current_module)))))
referred_defs)))]
defs' (case r_defs
@@ -4193,11 +4193,11 @@
(macro: .public (# tokens)
(case tokens
(^ (list struct [_ {#Symbol member}]))
- (in_meta (list (` (let [(^open (~ (text$ (alias_stand_in 0)))) (~ struct)]
+ (meta#in (list (` (let [(^open (~ (text$ (alias_stand_in 0)))) (~ struct)]
(~ (symbol$ member))))))
(^ (list& struct member args))
- (in_meta (list (` ((..# (~ struct) (~ member)) (~+ args)))))
+ (meta#in (list (` ((..# (~ struct) (~ member)) (~+ args)))))
_
(failure "Wrong syntax for #")))
@@ -4217,7 +4217,7 @@
(function (_ [r_slot_name [r_idx r_type]])
(do meta_monad
[g!slot (..generated_symbol "")]
- (in_meta [r_slot_name r_idx g!slot]))))
+ (meta#in [r_slot_name r_idx g!slot]))))
(zipped/2 tags (enumeration members)))]
(let [pattern (|> pattern'
(list#each (: (-> [Symbol Nat Code] (List Code))
@@ -4235,7 +4235,7 @@
r_var)))))
list#conjoint
tuple$)]
- (in_meta (list (` ({(~ pattern) (~ output)} (~ record)))))))
+ (meta#in (list (` ({(~ pattern) (~ output)} (~ record)))))))
_
(failure "with@ can only use records.")))
@@ -4300,7 +4300,7 @@
(function (_ [r_slot_name [r_idx r_type]])
(do meta_monad
[g!slot (..generated_symbol "")]
- (in_meta [r_slot_name r_idx g!slot]))))
+ (meta#in [r_slot_name r_idx g!slot]))))
(zipped/2 tags (enumeration members)))]
(let [pattern (|> pattern'
(list#each (: (-> [Symbol Nat Code] (List Code))
@@ -4318,7 +4318,7 @@
r_var)))))
list#conjoint
tuple$)]
- (in_meta (list (` ({(~ pattern) (~ output)} (~ record)))))))
+ (meta#in (list (` ({(~ pattern) (~ output)} (~ record)))))))
_
(failure "revised@ can only use records.")))
@@ -4375,7 +4375,7 @@
in))
{#None}))))
{#Some output}
- (in_meta (list#composite output branches))
+ (meta#in (list#composite output branches))
{#None}
(failure "Wrong syntax for ^template"))
@@ -4459,11 +4459,11 @@
(do meta_monad
[inits' (: (Meta (List Symbol))
(case (monad#each maybe_monad symbol_name inits)
- {#Some inits'} (in_meta inits')
+ {#Some inits'} (meta#in inits')
{#None} (failure "Wrong syntax for loop")))
init_types (monad#each meta_monad type_definition inits')
expected ..expected_type]
- (in_meta (list (` (("lux type check"
+ (meta#in (list (` (("lux type check"
(-> (~+ (list#each type_code init_types))
(~ (type_code expected)))
(function ((~ name) (~+ vars))
@@ -4474,7 +4474,7 @@
(: (-> Code (Meta Code))
(function (_ _) (..generated_symbol "")))
inits)]
- (in_meta (list (` (let [(~+ (..interleaved aliases inits))]
+ (meta#in (list (` (let [(~+ (..interleaved aliases inits))]
(.loop (~ name)
[(~+ (..interleaved vars aliases))]
(~ body)))))))))
@@ -4594,7 +4594,7 @@
[#Tuple])
_
- (in_meta token)
+ (meta#in token)
... TODO: Figure out why this doesn't work:
... (# meta_monad in token)
))
@@ -4616,10 +4616,10 @@
(-> Code (Meta [Code Code]))
(case level
(^ [_ {#Tuple (list expr binding)}])
- (in_meta [expr binding])
+ (meta#in [expr binding])
_
- (in_meta [level (` #1)])
+ (meta#in [level (` #1)])
))
(def: (multi_level_case^ levels)
@@ -4696,7 +4696,7 @@
(macro: .public (symbol tokens)
(case tokens
(^ (list [_ {#Symbol [module name]}]))
- (in_meta (list (` [(~ (text$ module)) (~ (text$ name))])))
+ (meta#in (list (` [(~ (text$ module)) (~ (text$ name))])))
_
(failure (..wrong_syntax_error [..prelude_module "symbol"]))))
@@ -4710,7 +4710,7 @@
(case tokens
(^ (list& [_meta {#Form (list [_ {#Symbol ["" name]}] pattern)}] body branches))
(let [g!whole (local_symbol$ name)]
- (in_meta (list& g!whole
+ (meta#in (list& g!whole
(` (case (~ g!whole) (~ pattern) (~ body)))
branches)))
@@ -4721,7 +4721,7 @@
(case tokens
(^ (list& [_meta {#Form (list [_ {#Symbol ["" name]}] [_ {#Tuple steps}])}] body branches))
(let [g!name (local_symbol$ name)]
- (in_meta (list& g!name
+ (meta#in (list& g!name
(` (let [(~ g!name) (|> (~ g!name) (~+ steps))]
(~ body)))
branches)))
@@ -4833,7 +4833,7 @@
(-> Code (Meta Text))
(case choice
[_ {#Text platform}]
- (..in_meta platform)
+ (..meta#in platform)
[_ {#Symbol symbol}]
(do meta_monad
@@ -4864,13 +4864,13 @@
(failure ($_ text#composite "No code for target platform: " target))
{#Some default}
- (in_meta (list default)))
+ (meta#in (list default)))
{#Item [key pick] options'}
(do meta_monad
[platform (..platform_name key)]
(if (text#= target platform)
- (in_meta (list pick))
+ (meta#in (list pick))
(target_pick target options' default)))))
(macro: .public (for tokens)
@@ -4966,7 +4966,7 @@
[#Tuple])
_
- (in_meta [(list) code])))
+ (meta#in [(list) code])))
(macro: .public (`` tokens)
(case tokens
@@ -5033,7 +5033,7 @@
[.#Symbol name$])
[_ {#Form {#Item [[_ {#Symbol ["" "~"]}] {#Item [unquoted {#End}]}]}}]
- (in_meta unquoted)
+ (meta#in unquoted)
[_ {#Form {#Item [[_ {#Symbol ["" "~+"]}] {#Item [spliced {#End}]}]}}]
(failure "Cannot use (~+) inside of ^code unless it is the last element in a form or a tuple.")
@@ -5074,7 +5074,7 @@
(^ (list [_ {#Tuple bindings}] bodyT))
(case (..pairs bindings)
{#Some bindings}
- (in_meta (list (` (..with_expansions [(~+ (|> bindings
+ (meta#in (list (` (..with_expansions [(~+ (|> bindings
(list#each (function (_ [localT valueT])
(list localT (` (..as_is (~ valueT))))))
(list#mix list#composite (list))))]