From 061fd8a209bbcaffc2bfb850ac6046752a567d50 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 27 Jul 2021 03:51:10 -0400 Subject: Re-named wrap => in && unwrap => out. --- stdlib/source/program/scriptum.lux | 72 +++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'stdlib/source/program/scriptum.lux') diff --git a/stdlib/source/program/scriptum.lux b/stdlib/source/program/scriptum.lux index 5d3117062..889ba4a0f 100644 --- a/stdlib/source/program/scriptum.lux +++ b/stdlib/source/program/scriptum.lux @@ -365,17 +365,17 @@ _ (format "(" (text.join_with " " (list& _name type_arguments)) ")")) nesting (list.size type_arguments)]] - (wrap (md.code (format (if signature? "(interface: " "(type: ") - (if recursive_type? "#rec " "") - usage text.new_line - (|> type - (unravel_type_func nesting) - (when> [(new> recursive_type? [])] [unrecurse_type]) - (pprint_type_definition (dec nesting) [_name type_arguments] (maybe.default (list) tags) module signature? recursive_type?) - (text.split_all_with text.new_line) - (list\map (|>> (format " "))) - (text.join_with text.new_line)) - ")")))) + (in (md.code (format (if signature? "(interface: " "(type: ") + (if recursive_type? "#rec " "") + usage text.new_line + (|> type + (unravel_type_func nesting) + (when> [(new> recursive_type? [])] [unrecurse_type]) + (pprint_type_definition (dec nesting) [_name type_arguments] (maybe.default (list) tags) module signature? recursive_type?) + (text.split_all_with text.new_line) + (list\map (|>> (format " "))) + (text.join_with text.new_line)) + ")")))) _ (meta.failure (exception.construct anonymous_type_definition type)))) @@ -389,19 +389,19 @@ (do meta.monad [#let [?doc (annotation.documentation def_annotations)] type_code (document_type module type def_annotations)] - (wrap ($_ md.then - (md.heading/3 name) - (case ?doc - (#.Some doc) - (md.paragraph (md.text doc)) - - _ - md.empty) - type_code))))) + (in ($_ md.then + (md.heading/3 name) + (case ?doc + (#.Some doc) + (md.paragraph (md.text doc)) + + _ + md.empty) + type_code))))) types)] - (wrap (list\fold (function.flip md.then) - (md.heading/2 "Types") - type_docs)))) + (in (list\fold (function.flip md.then) + (md.heading/2 "Types") + type_docs)))) (def: (document_macros module_name names) (-> Text (List [Text Code]) (Markdown Block)) @@ -414,7 +414,7 @@ (maybe.default md.empty) (do maybe.monad [documentation (annotation.documentation def_annotations)] - (wrap (md.code documentation)))))))) + (in (md.code documentation)))))))) (list\fold (function.flip md.then) (md.heading/2 "Macros")))) @@ -473,18 +473,18 @@ md.empty) empty_block (: (Markdown Block) md.empty)] types_documentation (if (list.empty? types) - (wrap empty_block) + (in empty_block) (document_types module_name types)) #let [documentation ($_ md.then types_documentation (if (list.empty? macros) empty_block (document_macros module_name macros)) (if (list.empty? implementations) empty_block (document_implementations module_name implementations)) (if (list.empty? values) empty_block (document_values module_name values)))]] - (wrap [module_name - ($_ md.then - (md.heading/1 module_name) - description - documentation)]))) + (in [module_name + ($_ md.then + (md.heading/1 module_name) + description + documentation)]))) (exception: #export (io_error {error Text}) error) @@ -494,12 +494,12 @@ (let [path (format (text.replace_all "/" "_" module_name) ".md")] (do io.monad [outcome (\ file.default write (\ utf8.codec encode (md.markdown documentation)) path)] - (wrap (case outcome - (#try.Failure error) - (debug.log! (exception.construct io_error error)) + (in (case outcome + (#try.Failure error) + (debug.log! (exception.construct io_error error)) - (#try.Success _) - []))))) + (#try.Success _) + []))))) (macro: (gen_documentation! _) (do {! meta.monad} @@ -513,7 +513,7 @@ (list.zipped/2 lux_modules) (monad.map ! document_module)) #let [_ (io.run (monad.map io.monad save_documentation! module_documentation))]] - (wrap (list)))) + (in (list)))) (gen_documentation!) -- cgit v1.2.3