From 3289b9dcf9d5d1c1e5c380e3185065c8fd32535f Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 16 Aug 2021 01:12:01 -0400 Subject: Made extension-definition macros specify their bindings the same way as syntax:. --- stdlib/source/program/aedifex/artifact.lux | 2 +- .../source/program/aedifex/artifact/time/date.lux | 6 +-- .../source/program/aedifex/artifact/time/time.lux | 10 ++--- stdlib/source/program/aedifex/command/build.lux | 2 +- .../source/program/aedifex/metadata/artifact.lux | 16 ++++---- stdlib/source/program/aedifex/pom.lux | 2 +- stdlib/source/program/compositor.lux | 2 +- stdlib/source/program/scriptum.lux | 44 +++++++++++----------- 8 files changed, 42 insertions(+), 42 deletions(-) (limited to 'stdlib/source/program') diff --git a/stdlib/source/program/aedifex/artifact.lux b/stdlib/source/program/aedifex/artifact.lux index e37894330..cd53db5c4 100644 --- a/stdlib/source/program/aedifex/artifact.lux +++ b/stdlib/source/program/aedifex/artifact.lux @@ -88,7 +88,7 @@ (-> Text Group Text) (|> group (text.all_split_by ..group_separator) - (text.join_with separator))) + (text.interposed separator))) (def: .public (uri version artifact) (-> Version Artifact URI) diff --git a/stdlib/source/program/aedifex/artifact/time/date.lux b/stdlib/source/program/aedifex/artifact/time/date.lux index 6e84811e6..c3c0b9cc1 100644 --- a/stdlib/source/program/aedifex/artifact/time/date.lux +++ b/stdlib/source/program/aedifex/artifact/time/date.lux @@ -76,9 +76,9 @@ (Parser Date) (do <>.monad [year (<>.codec n.decimal (.exactly 4 .decimal)) - year (<>.lift (year.year (.int year))) + year (<>.lifted (year.year (.int year))) month (<>.codec n.decimal (.exactly 2 .decimal)) - month (<>.lift (month.by_number month)) + month (<>.lifted (month.by_number month)) day_of_month (<>.codec n.decimal (.exactly 2 .decimal)) - date (<>.lift (date.date year month day_of_month))] + date (<>.lifted (date.date year month day_of_month))] (in (:abstraction date))))) diff --git a/stdlib/source/program/aedifex/artifact/time/time.lux b/stdlib/source/program/aedifex/artifact/time/time.lux index 8b33d5732..0db035d56 100644 --- a/stdlib/source/program/aedifex/artifact/time/time.lux +++ b/stdlib/source/program/aedifex/artifact/time/time.lux @@ -32,8 +32,8 @@ [hour (<>.codec n.decimal (.exactly 2 .decimal)) minute (<>.codec n.decimal (.exactly 2 .decimal)) second (<>.codec n.decimal (.exactly 2 .decimal))] - (<>.lift (time.time - {#time.hour hour - #time.minute minute - #time.second second - #time.milli_second 0})))) + (<>.lifted (time.time + {#time.hour hour + #time.minute minute + #time.second second + #time.milli_second 0})))) diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index 41668665e..ff469d896 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -245,7 +245,7 @@ (-> (List Path) Text) (|> host_dependencies (#.Item ".") - (text.join_with ..jvm_class_path_separator) + (text.interposed ..jvm_class_path_separator) %.text)) (def: .public (with_jvm_class_path host_dependencies runtime) diff --git a/stdlib/source/program/aedifex/metadata/artifact.lux b/stdlib/source/program/aedifex/metadata/artifact.lux index f4971546f..0d6f86c2c 100644 --- a/stdlib/source/program/aedifex/metadata/artifact.lux +++ b/stdlib/source/program/aedifex/metadata/artifact.lux @@ -115,11 +115,11 @@ (.Parser Date) (do <>.monad [year (<>.codec n.decimal (.exactly 4 .decimal)) - year (<>.lift (year.year (.int year))) + year (<>.lifted (year.year (.int year))) month (<>.codec n.decimal (.exactly 2 .decimal)) - month (<>.lift (month.by_number month)) + month (<>.lifted (month.by_number month)) day_of_month (<>.codec n.decimal (.exactly 2 .decimal))] - (<>.lift (date.date year month day_of_month)))) + (<>.lifted (date.date year month day_of_month)))) (def: time_parser (.Parser Time) @@ -127,11 +127,11 @@ [hour (<>.codec n.decimal (.exactly 2 .decimal)) minute (<>.codec n.decimal (.exactly 2 .decimal)) second (<>.codec n.decimal (.exactly 2 .decimal))] - (<>.lift (time.time - {#time.hour hour - #time.minute minute - #time.second second - #time.milli_second 0})))) + (<>.lifted (time.time + {#time.hour hour + #time.minute minute + #time.second second + #time.milli_second 0})))) (def: last_updated_parser (Parser Instant) diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux index f3a945d66..36e3ff440 100644 --- a/stdlib/source/program/aedifex/pom.lux +++ b/stdlib/source/program/aedifex/pom.lux @@ -168,7 +168,7 @@ [properties (\ ! map (dictionary.of_list name.hash) (<| (.node ["" ..dependency_tag]) (<>.some ..property_parser)))] - (<| <>.lift + (<| <>.lifted try.of_maybe (do maybe.monad [group (dictionary.value ["" ..group_tag] properties) diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux index efe7a6b28..1a6e7356e 100644 --- a/stdlib/source/program/compositor.lux +++ b/stdlib/source/program/compositor.lux @@ -178,6 +178,6 @@ ... (do {! async.monad} ... [console (|> console.default ... async.future - ... (\ ! map (|>> try.assumed console.async)))] + ... (\ ! map (|>> try.trusted console.async)))] ... (interpreter.run! (try.with async.monad) console platform interpretation generation_bundle))) )))) diff --git a/stdlib/source/program/scriptum.lux b/stdlib/source/program/scriptum.lux index ab4c2e787..dbe3ea022 100644 --- a/stdlib/source/program/scriptum.lux +++ b/stdlib/source/program/scriptum.lux @@ -95,7 +95,7 @@ (|> lines (text.all_split_by text.new_line) (list\map (|>> (format prefix))) - (text.join_with text.new_line))) + (text.interposed text.new_line))) (def: (pprint_type_definition level type_func_info tags module interface? recursive_type? type) (-> Nat [Text (List Text)] (List Name) Text Bit Bit Type Text) @@ -113,7 +113,7 @@ (format "(primitive " (%.text name) ")") _ - (format "(primitive " (%.text name) " " (|> params (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.join_with " ")) ")")) + (format "(primitive " (%.text name) " " (|> params (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.interposed " ")) ")")) [_ (#.Sum _)] (let [members (type.flat_variant type)] @@ -122,7 +122,7 @@ (format "(Or " (|> members (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) - (text.join_with " ")) + (text.interposed " ")) ")") _ @@ -135,18 +135,18 @@ (format "(#" t_name " " (|> types (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) - (text.join_with " ")) + (text.interposed " ")) ")")) _ (format "(#" t_name " " (pprint_type_definition level type_func_info #.None module interface? recursive_type? type) ")")))) - (text.join_with text.new_line)))) + (text.interposed text.new_line)))) [_ (#.Product _)] (let [members (type.flat_tuple type)] (case tags #.End - (format "[" (|> members (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.join_with " ")) "]") + (format "[" (|> members (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.interposed " ")) "]") _ (let [member_docs (|> members @@ -155,14 +155,14 @@ (if interface? (format "(: " (pprint_type_definition level type_func_info #.None module interface? recursive_type? type) text.new_line " " t_name ")") (format "#" t_name " " (pprint_type_definition level type_func_info #.None module interface? recursive_type? type))))) - (text.join_with (format text.new_line " ")))] + (text.interposed (format text.new_line " ")))] (if interface? member_docs (format "{" member_docs "}"))))) [_ (#.Function input output)] (let [[ins out] (type.flat_function type)] - (format "(-> " (|> ins (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.join_with " ")) + (format "(-> " (|> ins (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.interposed " ")) " " (pprint_type_definition level type_func_info #.None module interface? recursive_type? out) ")")) @@ -181,7 +181,7 @@ (let [[level' body] ( type) args (level_parameters level level') body_doc (pprint_type_definition (n.+ level level') type_func_info tags module interface? recursive_type? body)] - (format "(" " " "[" (text.join_with " " args) "]" + (format "(" " " "[" (text.interposed " " args) "]" (case tags #.End (format " " body_doc) @@ -197,7 +197,7 @@ [_ (#.Apply param fun)] (let [[type_func type_arguments] (type.flat_application type)] - (format "(" (pprint_type_definition level type_func_info tags module interface? recursive_type? type_func) " " (|> type_arguments (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.join_with " ")) ")")) + (format "(" (pprint_type_definition level type_func_info tags module interface? recursive_type? type_func) " " (|> type_arguments (list\map (pprint_type_definition level type_func_info #.None module interface? recursive_type?)) (text.interposed " ")) ")")) [_ (#.Named [_module _name] type)] (if (text\= module _module) @@ -214,20 +214,20 @@ (format "(primitive " (%.text name) ")") _ - (format "(primitive " (%.text name) " " (|> params (list\map (pprint_type level type_func_name module)) (list.interposed " ") (text.join_with "")) ")")) + (format "(primitive " (%.text name) " " (|> params (list\map (pprint_type level type_func_name module)) (text.interposed " ")) ")")) (#.Sum _) (let [members (type.flat_variant type)] - (format "(Or " (|> members (list\map (pprint_type level type_func_name module)) (list.interposed " ") (text.join_with "")) ")")) + (format "(Or " (|> members (list\map (pprint_type level type_func_name module)) (text.interposed " ")) ")")) (#.Product _) (let [members (type.flat_tuple type)] - (format "[" (|> members (list\map (pprint_type level type_func_name module)) (list.interposed " ") (text.join_with "")) "]")) + (format "[" (|> members (list\map (pprint_type level type_func_name module)) (text.interposed " ")) "]")) (#.Function input output) (let [[ins out] (type.flat_function type)] (format "(-> " - (|> ins (list\map (pprint_type level type_func_name module)) (list.interposed " ") (text.join_with "")) + (|> ins (list\map (pprint_type level type_func_name module)) (text.interposed " ")) " " (pprint_type level type_func_name module out) ")")) @@ -246,7 +246,7 @@ (let [[level' body] ( type) args (level_parameters level level') body_doc (pprint_type (n.+ level level') type_func_name module body)] - (format "(" " " "[" (|> args (list.interposed " ") (text.join_with "")) "]" + (format "(" " " "[" (|> args (text.interposed " ")) "]" (format " " body_doc) ")"))]) ([#.UnivQ "All" type.flat_univ_q] @@ -254,7 +254,7 @@ (#.Apply param fun) (let [[type_func type_arguments] (type.flat_application type)] - (format "(" (pprint_type level type_func_name module type_func) " " (|> type_arguments (list\map (pprint_type level type_func_name module)) (list.interposed " ") (text.join_with "")) ")")) + (format "(" (pprint_type level type_func_name module type_func) " " (|> type_arguments (list\map (pprint_type level type_func_name module)) (text.interposed " ")) ")")) (#.Named [_module _name] type) (if (text\= module _module) @@ -363,7 +363,7 @@ _name _ - (format "(" (text.join_with " " (list& _name type_arguments)) ")")) + (format "(" (text.interposed " " (list& _name type_arguments)) ")")) nesting (list.size type_arguments)]] (in (md.code (format (if interface? "(interface: " "(type: ") (if recursive_type? "#rec " "") @@ -374,7 +374,7 @@ (pprint_type_definition (dec nesting) [_name type_arguments] (maybe.else (list) tags) module interface? recursive_type?) (text.all_split_by text.new_line) (list\map (|>> (format " "))) - (text.join_with text.new_line)) + (text.interposed text.new_line)) ")")))) _ @@ -433,7 +433,7 @@ name args - (format "(" (text.join_with " " (list& name args)) ")"))] + (format "(" (text.interposed " " (list& name args)) ")"))] ($_ md.then (md.heading/3 usage) (case ?doc @@ -455,7 +455,7 @@ (|> block (text.all_split_by text.new_line) (list\map (text.enclosed pre+post)) - (text.join_with text.new_line))) + (text.interposed text.new_line))) (def: (document_module [[module_name module] organization]) (-> [[Text Module] Organization] (Meta [Text (Markdown Block)])) @@ -505,9 +505,9 @@ (do {! meta.monad} [all_modules meta.modules .let [lux_modules (|> all_modules - (list.only (function.compose lux_module? product.left)) + (list.only (function.composite lux_module? product.left)) (list.sorted name_sort))] - lux_exports (monad.map ! (function.compose meta.exports product.left) + lux_exports (monad.map ! (function.composite meta.exports product.left) lux_modules) module_documentation (|> (list\map organize_definitions lux_exports) (list.zipped/2 lux_modules) -- cgit v1.2.3