diff options
Diffstat (limited to 'stdlib/source/library/lux/control/function')
-rw-r--r-- | stdlib/source/library/lux/control/function/contract.lux | 14 | ||||
-rw-r--r-- | stdlib/source/library/lux/control/function/inline.lux | 20 | ||||
-rw-r--r-- | stdlib/source/library/lux/control/function/mutual.lux | 72 |
3 files changed, 53 insertions, 53 deletions
diff --git a/stdlib/source/library/lux/control/function/contract.lux b/stdlib/source/library/lux/control/function/contract.lux index bb6ef6731..7b093341f 100644 --- a/stdlib/source/library/lux/control/function/contract.lux +++ b/stdlib/source/library/lux/control/function/contract.lux @@ -34,16 +34,16 @@ (syntax (_ [test <code>.any expr <code>.any]) (in (list (` (exec - ((~! ..assert!) (~ (code.text (exception.error ..pre_condition_failed test))) - (~ test)) - (~ expr))))))) + ((,! ..assert!) (, (code.text (exception.error ..pre_condition_failed test))) + (, test)) + (, expr))))))) (def .public post (syntax (_ [test <code>.any expr <code>.any]) (with_symbols [g!output] - (in (list (` (let [(~ g!output) (~ expr)] + (in (list (` (let [(, g!output) (, expr)] (exec - ((~! ..assert!) (~ (code.text (exception.error ..post_condition_failed test))) - ((~ test) (~ g!output))) - (~ g!output))))))))) + ((,! ..assert!) (, (code.text (exception.error ..post_condition_failed test))) + ((, test) (, g!output))) + (, g!output))))))))) diff --git a/stdlib/source/library/lux/control/function/inline.lux b/stdlib/source/library/lux/control/function/inline.lux index 0564edc3d..135674144 100644 --- a/stdlib/source/library/lux/control/function/inline.lux +++ b/stdlib/source/library/lux/control/function/inline.lux @@ -36,17 +36,17 @@ (list.repeated (list.size parameters)) (monad.all !)) .let [inlined (` (("lux in-module" - (~ (code.text @)) - (.is (~ type) - (.function ((~ (code.local name)) (~+ parameters)) - (~ term)))) - (~+ (list#each (function (_ g!parameter) - (` ((~' ~) (~ g!parameter)))) + (, (code.text @)) + (.is (, type) + (.function ((, (code.local name)) (,* parameters)) + (, term)))) + (,* (list#each (function (_ g!parameter) + (` ((,' ,) (, g!parameter)))) g!parameters)))) g!parameters (|> g!parameters (list#each (function (_ parameter) - (list parameter (` (~! <code>.any))))) + (list parameter (` (,! <code>.any))))) list#conjoint)]] - (in (list (` (def (~ privacy) (~ (code.local name)) - ((~! syntax) ((~ (code.local name)) [(~+ g!parameters)]) - (.at (~! meta.monad) (~' in) (.list (.`' (~ inlined)))))))))))) + (in (list (` (def (, privacy) (, (code.local name)) + ((,! syntax) ((, (code.local name)) [(,* g!parameters)]) + (.at (,! meta.monad) (,' in) (.list (.`' (, inlined)))))))))))) diff --git a/stdlib/source/library/lux/control/function/mutual.lux b/stdlib/source/library/lux/control/function/mutual.lux index f00643060..0dcf766f5 100644 --- a/stdlib/source/library/lux/control/function/mutual.lux +++ b/stdlib/source/library/lux/control/function/mutual.lux @@ -37,17 +37,17 @@ (.def (mutual_definition context g!context [g!name mutual]) (-> (List Code) Code [Code Mutual] Code) - (` (function ((~ g!name) (~ g!context)) - (.let [[(~+ context)] (~ g!context)] - (function (~ (declaration.format (the #declaration mutual))) - (~ (the #body mutual))))))) + (` (function ((, g!name) (, g!context)) + (.let [[(,* context)] (, g!context)] + (function (, (declaration.format (the #declaration mutual))) + (, (the #body mutual))))))) (.def (macro g!context g!self) (-> Code Code Macro) (<| (as Macro) (is Macro') (function (_ parameters) - (at meta.monad in (list (` (((~ g!self) (~ g!context)) (~+ parameters)))))))) + (at meta.monad in (list (` (((, g!self) (, g!context)) (,* parameters)))))))) (.def .public let (syntax (_ [functions (<code>.tuple (<>.some ..mutual)) @@ -58,10 +58,10 @@ {.#Item mutual {.#End}} (.let [g!name (|> mutual (the [#declaration declaration.#name]) code.local)] - (in (list (` (.let [(~ g!name) (is (~ (the #type mutual)) - (function (~ (declaration.format (the #declaration mutual))) - (~ (the #body mutual))))] - (~ body)))))) + (in (list (` (.let [(, g!name) (is (, (the #type mutual)) + (function (, (declaration.format (the #declaration mutual))) + (, (the #body mutual))))] + (, body)))))) _ (macro.with_symbols [g!context g!output] @@ -73,7 +73,7 @@ (list.zipped_2 hidden_names functions)) context_types (list#each (function (_ mutual) - (` (-> (~ g!context) (~ (the #type mutual))))) + (` (-> (, g!context) (, (the #type mutual))))) functions) user_names (list#each (|>> (the [#declaration declaration.#name]) code.local) functions)] @@ -82,16 +82,16 @@ (..macro g!context g!name)]) (list.zipped_2 hidden_names functions)))] - (in (list (` (.let [(~ g!context) (is (Rec (~ g!context) - [(~+ context_types)]) - [(~+ definitions)]) - [(~+ user_names)] (.let [[(~+ user_names)] (~ g!context)] - [(~+ (list#each (function (_ g!name) - (` ((~ g!name) (~ g!context)))) + (in (list (` (.let [(, g!context) (is (Rec (, g!context) + [(,* context_types)]) + [(,* definitions)]) + [(,* user_names)] (.let [[(,* user_names)] (, g!context)] + [(,* (list#each (function (_ g!name) + (` ((, g!name) (, g!context)))) user_names))]) - (~ g!output) (~ body)] - (exec (~ g!pop) - (~ g!output))))))))))) + (, g!output) (, body)] + (exec (, g!pop) + (, g!output))))))))))) (type Definition (Record @@ -112,9 +112,9 @@ {.#Item definition {.#End}} (.let [(open "_[0]") definition (open "_[0]") _#mutual] - (in (list (` (.def (~ _#export_policy) (~ (declaration.format _#declaration)) - (~ _#type) - (~ _#body)))))) + (in (list (` (.def (, _#export_policy) (, (declaration.format _#declaration)) + (, _#type) + (, _#body)))))) _ (macro.with_symbols [g!context g!output] @@ -126,7 +126,7 @@ (list.zipped_2 hidden_names (list#each (the #mutual) functions))) context_types (list#each (function (_ mutual) - (` (-> (~ g!context) (~ (the [#mutual #type] mutual))))) + (` (-> (, g!context) (, (the [#mutual #type] mutual))))) functions) user_names (list#each (|>> (the [#mutual #declaration declaration.#name]) code.local) functions)] @@ -135,22 +135,22 @@ (..macro g!context g!name)]) (list.zipped_2 hidden_names functions)))] - (in (list.partial (` (.def (~ g!context) - [(~+ (list#each (the [#mutual #type]) functions))] - (.let [(~ g!context) (is (Rec (~ g!context) - [(~+ context_types)]) - [(~+ definitions)]) - [(~+ user_names)] (~ g!context)] - [(~+ (list#each (function (_ g!name) - (` ((~ g!name) (~ g!context)))) + (in (list.partial (` (.def (, g!context) + [(,* (list#each (the [#mutual #type]) functions))] + (.let [(, g!context) (is (Rec (, g!context) + [(,* context_types)]) + [(,* definitions)]) + [(,* user_names)] (, g!context)] + [(,* (list#each (function (_ g!name) + (` ((, g!name) (, g!context)))) user_names))]))) g!pop (list#each (function (_ mutual) (.let [g!name (|> mutual (the [#mutual #declaration declaration.#name]) code.local)] (` (.def - (~ (the #export_policy mutual)) - (~ g!name) - (~ (the [#mutual #type] mutual)) - (.let [[(~+ user_names)] (~ g!context)] - (~ g!name)))))) + (, (the #export_policy mutual)) + (, g!name) + (, (the [#mutual #type] mutual)) + (.let [[(,* user_names)] (, g!context)] + (, g!name)))))) functions)))))))) |