aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/function/mutual.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/control/function/mutual.lux')
-rw-r--r--stdlib/source/library/lux/control/function/mutual.lux82
1 files changed, 41 insertions, 41 deletions
diff --git a/stdlib/source/library/lux/control/function/mutual.lux b/stdlib/source/library/lux/control/function/mutual.lux
index b59578d3a..102457383 100644
--- a/stdlib/source/library/lux/control/function/mutual.lux
+++ b/stdlib/source/library/lux/control/function/mutual.lux
@@ -1,28 +1,28 @@
(.using
- [library
- [lux {"-" Definition let def: macro}
- ["[0]" meta]
- [abstract
- ["[0]" monad {"+" do}]]
- [control
- ["[0]" try {"+" Try}]
- ["[0]" exception {"+" exception:}]
- ["<>" parser ("[1]#[0]" monad)
- ["<[0]>" code {"+" Parser}]]]
- [data
- ["[0]" product]
- [text
- ["%" format {"+" format}]]
- [collection
- ["[0]" list ("[1]#[0]" functor)]
- [dictionary
- ["[0]" plist {"+" PList}]]]]
- ["[0]" macro
- ["[0]" local]
- ["[0]" code]
- [syntax {"+" syntax:}
- ["[0]" declaration {"+" Declaration}]]]]]
- ["[0]" //])
+ [library
+ [lux {"-" Definition let def: macro}
+ ["[0]" meta]
+ [abstract
+ ["[0]" monad {"+" do}]]
+ [control
+ ["[0]" try {"+" Try}]
+ ["[0]" exception {"+" exception:}]
+ ["<>" parser ("[1]#[0]" monad)
+ ["<[0]>" code {"+" Parser}]]]
+ [data
+ ["[0]" product]
+ [text
+ ["%" format {"+" format}]]
+ [collection
+ ["[0]" list ("[1]#[0]" functor)]
+ [dictionary
+ ["[0]" plist {"+" PList}]]]]
+ ["[0]" macro
+ ["[0]" local]
+ ["[0]" code]
+ [syntax {"+" syntax:}
+ ["[0]" declaration {"+" Declaration}]]]]]
+ ["[0]" //])
(type: Mutual
(Record
@@ -42,8 +42,8 @@
(-> (List Code) Code [Code Mutual] Code)
(` (function ((~ g!name) (~ g!context))
(.let [[(~+ context)] (~ g!context)]
- (function (~ (declaration.format (value@ #declaration mutual)))
- (~ (value@ #body mutual)))))))
+ (function (~ (declaration.format (the #declaration mutual)))
+ (~ (the #body mutual)))))))
(.def: (macro g!context g!self)
(-> Code Code Macro)
@@ -59,10 +59,10 @@
(in (list body))
{.#Item mutual {.#End}}
- (.let [g!name (|> mutual (value@ [#declaration declaration.#name]) code.local_symbol)]
- (in (list (` (.let [(~ g!name) (: (~ (value@ #type mutual))
- (function (~ (declaration.format (value@ #declaration mutual)))
- (~ (value@ #body mutual))))]
+ (.let [g!name (|> mutual (the [#declaration declaration.#name]) code.local_symbol)]
+ (in (list (` (.let [(~ g!name) (: (~ (the #type mutual))
+ (function (~ (declaration.format (the #declaration mutual)))
+ (~ (the #body mutual))))]
(~ body))))))
_
@@ -75,12 +75,12 @@
(list.zipped/2 hidden_names
functions))
context_types (list#each (function (_ mutual)
- (` (-> (~ g!context) (~ (value@ #type mutual)))))
+ (` (-> (~ g!context) (~ (the #type mutual)))))
functions)
- user_names (list#each (|>> (value@ [#declaration declaration.#name]) code.local_symbol)
+ user_names (list#each (|>> (the [#declaration declaration.#name]) code.local_symbol)
functions)]
g!pop (local.push (list#each (function (_ [g!name mutual])
- [[here_name (value@ [#declaration declaration.#name] mutual)]
+ [[here_name (the [#declaration declaration.#name] mutual)]
(..macro g!context g!name)])
(list.zipped/2 hidden_names
functions)))]
@@ -125,19 +125,19 @@
functions)
.let [definitions (list#each (..mutual_definition hidden_names g!context)
(list.zipped/2 hidden_names
- (list#each (value@ #mutual) functions)))
+ (list#each (the #mutual) functions)))
context_types (list#each (function (_ mutual)
- (` (-> (~ g!context) (~ (value@ [#mutual #type] mutual)))))
+ (` (-> (~ g!context) (~ (the [#mutual #type] mutual)))))
functions)
- user_names (list#each (|>> (value@ [#mutual #declaration declaration.#name]) code.local_symbol)
+ user_names (list#each (|>> (the [#mutual #declaration declaration.#name]) code.local_symbol)
functions)]
g!pop (local.push (list#each (function (_ [g!name mutual])
- [[here_name (value@ [#mutual #declaration declaration.#name] mutual)]
+ [[here_name (the [#mutual #declaration declaration.#name] mutual)]
(..macro g!context g!name)])
(list.zipped/2 hidden_names
functions)))]
(in (list& (` (.def: (~ g!context)
- [(~+ (list#each (value@ [#mutual #type]) functions))]
+ [(~+ (list#each (the [#mutual #type]) functions))]
(.let [(~ g!context) (: (Rec (~ g!context)
[(~+ context_types)])
[(~+ definitions)])
@@ -147,11 +147,11 @@
user_names))])))
g!pop
(list#each (function (_ mutual)
- (.let [g!name (|> mutual (value@ [#mutual #declaration declaration.#name]) code.local_symbol)]
+ (.let [g!name (|> mutual (the [#mutual #declaration declaration.#name]) code.local_symbol)]
(` (.def:
- (~ (value@ #export_policy mutual))
+ (~ (the #export_policy mutual))
(~ g!name)
- (~ (value@ [#mutual #type] mutual))
+ (~ (the [#mutual #type] mutual))
(.let [[(~+ user_names)] (~ g!context)]
(~ g!name))))))
functions)))))))