diff options
Diffstat (limited to '')
30 files changed, 195 insertions, 195 deletions
diff --git a/stdlib/source/program/aedifex.lux b/stdlib/source/program/aedifex.lux index c84f57170..664883ab0 100644 --- a/stdlib/source/program/aedifex.lux +++ b/stdlib/source/program/aedifex.lux @@ -85,13 +85,13 @@ [exit_code output] ((command console program (file.async file.default) (shell.async shell.default) resolution) profile) _ (case exit_code (^ (static shell.normal)) - (wrap []) + (in []) _ (do async.monad [_ (\ program exit exit_code)] - (wrap (#try.Failure ""))))] - (wrap output))) + (in (#try.Failure ""))))] + (in output))) (exception: (cannot_find_repository {repository Text} {options (Dictionary Text Address)}) @@ -122,7 +122,7 @@ (#try.Failure error) (..fail! error)))) - (\ io.monad wrap []))) + (\ io.monad in []))) (program: [{[profile operation] /cli.command}] (do {! io.monad} @@ -148,7 +148,7 @@ (let [program (program.async program.default)] (case operation #/cli.Version - (wrap []) + (in []) #/cli.Clean (..command @@ -175,10 +175,10 @@ profile) [#.None _] - (async\wrap (exception.throw /.no_identity [])) + (async\in (exception.except /.no_identity [])) [_ #.None] - (async\wrap (exception.throw ..cannot_find_repository [repository (get@ #/.deploy_repositories profile)])))) + (async\in (exception.except ..cannot_find_repository [repository (get@ #/.deploy_repositories profile)])))) #/cli.Dependencies (..command diff --git a/stdlib/source/program/aedifex/artifact/snapshot.lux b/stdlib/source/program/aedifex/artifact/snapshot.lux index b377c1b38..6a5849f43 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot.lux @@ -51,7 +51,7 @@ (def: local_copy_parser (Parser Any) (<| (<xml>.node ..<local_copy>) - (<text>.embed (<text>.this ..local_copy_value)) + (<text>.then (<text>.this ..local_copy_value)) <xml>.text)) (def: #export (format snapshot) diff --git a/stdlib/source/program/aedifex/artifact/snapshot/build.lux b/stdlib/source/program/aedifex/artifact/snapshot/build.lux index 0e8692054..37bb3ca2d 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/build.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/build.lux @@ -38,5 +38,5 @@ (def: #export parser (Parser Build) (<| (<xml>.node ..tag) - (<text>.embed (<>.codec nat.decimal (<text>.many <text>.decimal))) + (<text>.then (<>.codec nat.decimal (<text>.many <text>.decimal))) <xml>.text)) diff --git a/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux b/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux index 147369711..0e9cba494 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/stamp.lux @@ -46,7 +46,7 @@ (def: time_parser (Parser Time) (<| (<xml>.node <timestamp>) - (<text>.embed //time.parser) + (<text>.then //time.parser) <xml>.text)) (def: #export parser diff --git a/stdlib/source/program/aedifex/artifact/snapshot/time.lux b/stdlib/source/program/aedifex/artifact/snapshot/time.lux index 46c9b149e..08f8b8035 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/time.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/time.lux @@ -43,4 +43,4 @@ [date ///time/date.parser _ (<text>.this ..separator) time ///time/time.parser] - (wrap [date time]))) + (in [date time]))) diff --git a/stdlib/source/program/aedifex/artifact/snapshot/version.lux b/stdlib/source/program/aedifex/artifact/snapshot/version.lux index 89af452e2..c1341cf98 100644 --- a/stdlib/source/program/aedifex/artifact/snapshot/version.lux +++ b/stdlib/source/program/aedifex/artifact/snapshot/version.lux @@ -62,6 +62,6 @@ ($_ <>.and (<xml>.somewhere (..text ..<extension>)) (<xml>.somewhere (..text ..<value>)) - (<xml>.somewhere (<text>.embed ///time.parser - (..text ..<updated>))) + (<xml>.somewhere (<text>.then ///time.parser + (..text ..<updated>))) ))) diff --git a/stdlib/source/program/aedifex/artifact/time.lux b/stdlib/source/program/aedifex/artifact/time.lux index 524b68bb1..c8452a477 100644 --- a/stdlib/source/program/aedifex/artifact/time.lux +++ b/stdlib/source/program/aedifex/artifact/time.lux @@ -36,8 +36,8 @@ (-> Instant (Try Time)) (do try.monad [date (/date.date (instant.date instant))] - (wrap [date - (instant.time instant)]))) + (in [date + (instant.time instant)]))) (def: #export equivalence (Equivalence Time) @@ -54,4 +54,4 @@ (do <>.monad [date /date.parser time /time.parser] - (wrap [date time]))) + (in [date time]))) diff --git a/stdlib/source/program/aedifex/artifact/time/date.lux b/stdlib/source/program/aedifex/artifact/time/date.lux index f6b8ae5a9..b392a5569 100644 --- a/stdlib/source/program/aedifex/artifact/time/date.lux +++ b/stdlib/source/program/aedifex/artifact/time/date.lux @@ -51,7 +51,7 @@ (if (and (i.>= ..min_year year) (i.<= ..max_year year)) (#try.Success (:abstraction raw)) - (exception.throw ..year_is_out_of_range [(date.year raw)])))) + (exception.except ..year_is_out_of_range [(date.year raw)])))) (def: #export value (-> Date date.Date) @@ -79,4 +79,4 @@ month (<>.lift (month.by_number month)) day_of_month (<>.codec n.decimal (<text>.exactly 2 <text>.decimal)) date (<>.lift (date.date year month day_of_month))] - (wrap (:abstraction date))))) + (in (:abstraction date))))) diff --git a/stdlib/source/program/aedifex/artifact/versioning.lux b/stdlib/source/program/aedifex/artifact/versioning.lux index 9c9805571..37adedea1 100644 --- a/stdlib/source/program/aedifex/artifact/versioning.lux +++ b/stdlib/source/program/aedifex/artifact/versioning.lux @@ -77,7 +77,7 @@ (def: last_updated_parser (Parser //time.Time) - (<| (<text>.embed //time.parser) + (<| (<text>.then //time.parser) (..text ..<last_updated>))) (def: #export parser diff --git a/stdlib/source/program/aedifex/command/build.lux b/stdlib/source/program/aedifex/command/build.lux index b5df31411..6a0b6bcd0 100644 --- a/stdlib/source/program/aedifex/command/build.lux +++ b/stdlib/source/program/aedifex/command/build.lux @@ -104,10 +104,10 @@ [#Ruby ..ruby_compiler_name]) _ - (exception.throw ..no_available_compiler [])) + (exception.except ..no_available_compiler [])) _ - (exception.throw ..no_available_compiler [])))) + (exception.except ..no_available_compiler [])))) (def: (path fs home dependency) (All [!] (-> (file.System !) Path Dependency Path)) @@ -266,7 +266,7 @@ (let [target (get@ #///.target profile)] (case (get@ #///.program profile) #.None - (async\wrap (exception.throw ..no_specified_program [])) + (async\in (exception.except ..no_specified_program [])) (#.Some program_module) (do async.monad @@ -274,7 +274,7 @@ #let [home (\ program home) working_directory (\ program directory)]] (do ///action.monad - [[resolution compiler] (async\wrap (..compiler resolution (get@ #///.compiler profile))) + [[resolution compiler] (async\in (..compiler resolution (get@ #///.compiler profile))) #let [host_dependencies (..host_dependencies fs home resolution) [[command compiler_params] output] (case compiler (#JVM dependency) @@ -313,6 +313,6 @@ ..success ..failure) console)] - (wrap [exit - compiler - (format cache_directory / output)]))))))) + (in [exit + compiler + (format cache_directory / output)]))))))) diff --git a/stdlib/source/program/aedifex/command/clean.lux b/stdlib/source/program/aedifex/command/clean.lux index 2ff701d2b..c7443beb6 100644 --- a/stdlib/source/program/aedifex/command/clean.lux +++ b/stdlib/source/program/aedifex/command/clean.lux @@ -45,5 +45,5 @@ (\ ! map (monad.map ! recur)) (\ ! join))] (\ fs delete root))) - (\ ! wrap [])))] + (\ ! in [])))] (console.write_line (..success target) console))) diff --git a/stdlib/source/program/aedifex/command/deploy.lux b/stdlib/source/program/aedifex/command/deploy.lux index 79f6e4f2f..9e74a53a5 100644 --- a/stdlib/source/program/aedifex/command/deploy.lux +++ b/stdlib/source/program/aedifex/command/deploy.lux @@ -64,7 +64,7 @@ set.to_list (export.library fs) (\ ! map (binary.run tar.writer))) - pom (\ async.monad wrap (///pom.write profile)) + pom (\ async.monad in (///pom.write profile)) _ (///dependency/deployment.one repository [artifact ///artifact/type.lux_library] diff --git a/stdlib/source/program/aedifex/command/deps.lux b/stdlib/source/program/aedifex/command/deps.lux index 7e0d655e9..434bedbdd 100644 --- a/stdlib/source/program/aedifex/command/deps.lux +++ b/stdlib/source/program/aedifex/command/deps.lux @@ -74,4 +74,4 @@ (list.sort (\ ///dependency.order <)) (exception.enumerate ..format))]) console)] - (wrap resolution)))) + (in resolution)))) diff --git a/stdlib/source/program/aedifex/command/install.lux b/stdlib/source/program/aedifex/command/install.lux index 142829a8c..ddc73ca36 100644 --- a/stdlib/source/program/aedifex/command/install.lux +++ b/stdlib/source/program/aedifex/command/install.lux @@ -60,7 +60,7 @@ (export.library fs)) pom (|> profile ///pom.write - (\ async.monad wrap)) + (\ async.monad in)) _ (///dependency/deployment.one repository [identity ///artifact/type.lux_library] (let [pom_data (|> pom diff --git a/stdlib/source/program/aedifex/command/pom.lux b/stdlib/source/program/aedifex/command/pom.lux index 73e10f0fc..3b6412070 100644 --- a/stdlib/source/program/aedifex/command/pom.lux +++ b/stdlib/source/program/aedifex/command/pom.lux @@ -31,6 +31,6 @@ [content (|> (///pom.write profile) (try\map (|>> (\ xml.codec encode) (\ utf8.codec encode))) - async\wrap) + async\in) _ (\ fs write content ///pom.file)] (console.write_line ..success console))) diff --git a/stdlib/source/program/aedifex/command/test.lux b/stdlib/source/program/aedifex/command/test.lux index e159a48f2..7af6a4351 100644 --- a/stdlib/source/program/aedifex/command/test.lux +++ b/stdlib/source/program/aedifex/command/test.lux @@ -67,5 +67,5 @@ ..success ..failure) console)] - (wrap [exit []])) - (wrap [build_exit []]))))) + (in [exit []])) + (in [build_exit []]))))) diff --git a/stdlib/source/program/aedifex/dependency/deployment.lux b/stdlib/source/program/aedifex/dependency/deployment.lux index 3a7cba41f..a6302d5f0 100644 --- a/stdlib/source/program/aedifex/dependency/deployment.lux +++ b/stdlib/source/program/aedifex/dependency/deployment.lux @@ -54,7 +54,7 @@ [_ (\ repository upload artifact data)] (case status #///dependency/status.Unverified - (wrap []) + (in []) (#///dependency/status.Partial partial) (case partial @@ -103,17 +103,17 @@ (#///artifact/snapshot.Remote [now (inc build)])))) (set@ [#///metadata/snapshot.versioning #///artifact/versioning.last_updated] now)) versioning_snapshot (get@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] snapshot)]] - (wrap (|> snapshot - (set@ [#///metadata/snapshot.versioning #///artifact/versioning.versions] - (list {#///artifact/snapshot/version.extension type - #///artifact/snapshot/version.value (///artifact/snapshot/version/value.format - {#///artifact/snapshot/version/value.version version_template - #///artifact/snapshot/version/value.snapshot versioning_snapshot}) - #///artifact/snapshot/version.updated now})) - ## (set@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] - ## (list\compose (..artifacts type (product.right (get@ #///package.library package))) - ## (..artifacts ///artifact/type.pom (product.right (get@ #///package.pom package))))) - )))) + (in (|> snapshot + (set@ [#///metadata/snapshot.versioning #///artifact/versioning.versions] + (list {#///artifact/snapshot/version.extension type + #///artifact/snapshot/version.value (///artifact/snapshot/version/value.format + {#///artifact/snapshot/version/value.version version_template + #///artifact/snapshot/version/value.snapshot versioning_snapshot}) + #///artifact/snapshot/version.updated now})) + ## (set@ [#///metadata/snapshot.versioning #///artifact/versioning.snapshot] + ## (list\compose (..artifacts type (product.right (get@ #///package.library package))) + ## (..artifacts ///artifact/type.pom (product.right (get@ #///package.pom package))))) + )))) (def: #export (one repository [artifact type] package) (-> (Repository Async) Dependency Package (Async (Try Artifact))) @@ -131,14 +131,14 @@ status])) snapshot (///metadata/snapshot.read repository artifact) - snapshot (\ ! wrap (..update_snapshot [artifact type] now snapshot)) + snapshot (\ ! in (..update_snapshot [artifact type] now snapshot)) _ (///metadata/snapshot.write repository artifact snapshot) project (///metadata/artifact.read repository artifact) _ (|> project (set@ #///metadata/artifact.versions (list version_template)) (set@ #///metadata/artifact.last_updated now) (///metadata/artifact.write repository artifact))] - (wrap artifact)))) + (in artifact)))) (def: #export (all repository resolution) (-> (Repository Async) Resolution (Async (Try (Set Artifact)))) diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index 1a97dad34..8c7b6ab6a 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -82,22 +82,22 @@ [?actual (\ repository download (///repository/remote.uri version_template artifact extension))] (case ?actual (#try.Success actual) - (wrap (do {! try.monad} - [output (\ ! map (|>> (:as java/lang/String) - java/lang/String::trim - (:as Text)) - (\ utf8.codec decode actual)) - actual (|> output - (text.split_all_with " ") - list.head - (maybe.default output) - (\ codec decode)) - _ (exception.assert exception [artifact extension output] - (\ ///hash.equivalence = (hash library) actual))] - (wrap (#.Some actual)))) + (in (do {! try.monad} + [output (\ ! map (|>> (:as java/lang/String) + java/lang/String::trim + (:as Text)) + (\ utf8.codec decode actual)) + actual (|> output + (text.split_all_with " ") + list.head + (maybe.default output) + (\ codec decode)) + _ (exception.assert exception [artifact extension output] + (\ ///hash.equivalence = (hash library) actual))] + (in (#.Some actual)))) (#try.Failure error) - (wrap (#try.Success #.None))))) + (in (#try.Success #.None))))) (def: (hashed repository version_template artifact extension) (-> (Repository Async) Version Artifact Extension (Async (Try [Binary Status]))) @@ -109,18 +109,18 @@ ?md5 (..verified_hash data repository version_template artifact (format extension ///artifact/extension.md5) ///hash.md5 ///hash.md5_codec ..md5_does_not_match)] - (wrap [data (case [?sha-1 ?md5] - [(#.Some sha-1) (#.Some md5)] - (#//status.Verified sha-1 md5) + (in [data (case [?sha-1 ?md5] + [(#.Some sha-1) (#.Some md5)] + (#//status.Verified sha-1 md5) - [(#.Some sha-1) _] - (#//status.Partial (#.Left sha-1)) + [(#.Some sha-1) _] + (#//status.Partial (#.Left sha-1)) - [_ (#.Some md5)] - (#//status.Partial (#.Right md5)) + [_ (#.Some md5)] + (#//status.Partial (#.Right md5)) - [#.None #.None] - #//status.Unverified)]))) + [#.None #.None] + #//status.Unverified)]))) (def: #export (one repository dependency) (-> (Repository Async) Dependency (Async (Try Package))) @@ -134,14 +134,14 @@ artifact (set@ #///artifact.version artifact_version artifact)] [pom_data pom_status] (..hashed repository version_template artifact ///artifact/extension.pom) library_&_status (..hashed repository version_template artifact extension)] - (\ async.monad wrap + (\ async.monad in (do try.monad [pom (\ utf8.codec decode pom_data) pom (\ xml.codec decode pom) profile (<xml>.run ///pom.parser (list pom))] - (wrap {#///package.origin (#///repository/origin.Remote "") - #///package.library library_&_status - #///package.pom [pom pom_data pom_status]})))))) + (in {#///package.origin (#///repository/origin.Remote "") + #///package.library library_&_status + #///package.pom [pom pom_data pom_status]})))))) (type: #export Resolution (Dictionary Dependency Package)) @@ -179,8 +179,8 @@ (case repositories #.Nil (|> dependency - (exception.throw ..cannot_resolve) - (\ async.monad wrap)) + (exception.except ..cannot_resolve) + (\ async.monad in)) (#.Cons repository alternatives) (do {! async.monad} @@ -190,7 +190,7 @@ (#try.Success package) (do ! [_ (..announce_success console repository (get@ #//.artifact dependency))] - (wrap outcome)) + (in outcome)) (#try.Failure error) (do ! @@ -209,7 +209,7 @@ resolution resolution] (case dependencies #.Nil - (\ async.monad wrap + (\ async.monad in [successes failures resolution]) (#.Cons head tail) @@ -223,7 +223,7 @@ _ (do {! async.monad} [?package (case (dictionary.get head resolution) (#.Some package) - (wrap (#try.Success package)) + (in (#try.Success package)) #.None (..any console repositories head))] diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux index 760c05ce1..4e83b8f07 100644 --- a/stdlib/source/program/aedifex/hash.lux +++ b/stdlib/source/program/aedifex/hash.lux @@ -99,7 +99,7 @@ (-> Binary (Try (Hash <kind>))) (if (n.= <size> (binary.size data)) (#try.Success (:abstraction data)) - (exception.throw <exception> [data])))] + (exception.except <exception> [data])))] [as_sha-1 SHA-1 ..sha-1::size ..not_a_sha-1] [as_md5 MD5 ..md5::size ..not_a_md5] @@ -142,8 +142,8 @@ ([1 binary.write/8] [2 binary.write/16] [4 binary.write/32]) - _ (exception.throw ..not_a_hash [(..encoding_size size) encoded]))))) - (exception.throw ..not_a_hash [(..encoding_size size) encoded])))) + _ (exception.except ..not_a_hash [(..encoding_size size) encoded]))))) + (exception.except ..not_a_hash [(..encoding_size size) encoded])))) (template [<codec> <hash> <nat> <constructor>] [(implementation: #export <codec> diff --git a/stdlib/source/program/aedifex/metadata/artifact.lux b/stdlib/source/program/aedifex/metadata/artifact.lux index 55659f391..777c7df1b 100644 --- a/stdlib/source/program/aedifex/metadata/artifact.lux +++ b/stdlib/source/program/aedifex/metadata/artifact.lux @@ -135,11 +135,11 @@ (def: last_updated_parser (Parser Instant) - (<text>.embed (do <>.monad - [date ..date_parser - time ..time_parser] - (wrap (instant.of_date_time date time))) - (..text ..<last_updated>))) + (<text>.then (do <>.monad + [date ..date_parser + time ..time_parser] + (in (instant.of_date_time date time))) + (..text ..<last_updated>))) (def: #export parser (Parser Metadata) @@ -178,19 +178,19 @@ [project (\ repository download (..uri artifact))] (case project (#try.Success project) - (wrap (|> project - (do> try.monad - [(\ utf8.codec decode)] - [(\ xml.codec decode)] - [list (<xml>.run ..parser)]))) + (in (|> project + (do> try.monad + [(\ utf8.codec decode)] + [(\ xml.codec decode)] + [list (<xml>.run ..parser)]))) (#try.Failure error) - (wrap (#try.Success - (let [(^slots [#///artifact.group #///artifact.name]) artifact] - {#group group - #name name - #versions (list) - #last_updated ..epoch})))))) + (in (#try.Success + (let [(^slots [#///artifact.group #///artifact.name]) artifact] + {#group group + #name name + #versions (list) + #last_updated ..epoch})))))) (def: #export (write repository artifact metadata) (-> (Repository Async) Artifact Metadata (Async (Try Any))) diff --git a/stdlib/source/program/aedifex/metadata/snapshot.lux b/stdlib/source/program/aedifex/metadata/snapshot.lux index 6faab7b3b..c96957740 100644 --- a/stdlib/source/program/aedifex/metadata/snapshot.lux +++ b/stdlib/source/program/aedifex/metadata/snapshot.lux @@ -106,10 +106,10 @@ (<>.default {#///artifact/versioning.snapshot #///artifact/snapshot.Local #///artifact/versioning.last_updated ///artifact/time.epoch #///artifact/versioning.versions (list <default_version>)})))] - (wrap {#artifact {#///artifact.group group - #///artifact.name name - #///artifact.version version} - #versioning versioning})))) + (in {#artifact {#///artifact.group group + #///artifact.name name + #///artifact.version version} + #versioning versioning})))) (def: #export equivalence (Equivalence Metadata) @@ -128,16 +128,16 @@ [project (\ repository download (..uri artifact))] (case project (#try.Success project) - (wrap (|> project - (do> try.monad - [(\ utf8.codec decode)] - [(\ xml.codec decode)] - [list (<xml>.run ..parser)]))) + (in (|> project + (do> try.monad + [(\ utf8.codec decode)] + [(\ xml.codec decode)] + [list (<xml>.run ..parser)]))) (#try.Failure error) - (wrap (#try.Success - {#artifact artifact - #versioning ///artifact/versioning.init}))))) + (in (#try.Success + {#artifact artifact + #versioning ///artifact/versioning.init}))))) (def: #export (write repository artifact metadata) (-> (Repository Async) Artifact Metadata (Async (Try Any))) diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux index b458c7a21..145d65f6e 100644 --- a/stdlib/source/program/aedifex/pom.lux +++ b/stdlib/source/program/aedifex/pom.lux @@ -152,7 +152,7 @@ ))) _ - (exception.throw /.no_identity []))) + (exception.except /.no_identity []))) (def: property_parser (Parser [Tag Text]) @@ -173,16 +173,16 @@ (do maybe.monad [group (dictionary.get ["" ..group_tag] properties) artifact (dictionary.get ["" ..artifact_tag] properties)] - (wrap {#//dependency.artifact {#//artifact.group group - #//artifact.name artifact - #//artifact.version (|> properties - (dictionary.get ["" ..version_tag]) - (maybe.default "") - (text.replace_all "${project.version}" own_version) - (text.replace_all "${project.parent.version}" parent_version))} - #//dependency.type (|> properties - (dictionary.get ["" "type"]) - (maybe.default //artifact/type.jvm_library))}))))) + (in {#//dependency.artifact {#//artifact.group group + #//artifact.name artifact + #//artifact.version (|> properties + (dictionary.get ["" ..version_tag]) + (maybe.default "") + (text.replace_all "${project.version}" own_version) + (text.replace_all "${project.parent.version}" parent_version))} + #//dependency.type (|> properties + (dictionary.get ["" "type"]) + (maybe.default //artifact/type.jvm_library))}))))) (def: (dependencies_parser own_version parent_version) (-> Text Text (Parser (List Dependency))) @@ -224,8 +224,8 @@ <xml>.somewhere (<>.default (list))) _ (<>.some <xml>.ignore)] - (wrap (|> (\ /.monoid identity) - (update@ #/.dependencies (function (_ empty) - (list\fold set.add empty dependencies))) - (update@ #/.repositories (function (_ empty) - (list\fold set.add empty repositories))))))))) + (in (|> (\ /.monoid identity) + (update@ #/.dependencies (function (_ empty) + (list\fold set.add empty dependencies))) + (update@ #/.repositories (function (_ empty) + (list\fold set.add empty repositories))))))))) diff --git a/stdlib/source/program/aedifex/project.lux b/stdlib/source/program/aedifex/project.lux index d845ed689..9d3574bd1 100644 --- a/stdlib/source/program/aedifex/project.lux +++ b/stdlib/source/program/aedifex/project.lux @@ -57,19 +57,19 @@ (case (list.find (set.member? lineage) (get@ #//.parents profile)) (#.Some ouroboros) - (exception.throw ..circular_dependency [ouroboros name]) + (exception.except ..circular_dependency [ouroboros name]) #.None (do {! try.monad} [parents (monad.map ! (profile' (set.add name lineage) project) (get@ #//.parents profile))] - (wrap (list\fold (function (_ parent child) - (\ //.monoid compose child parent)) - (set@ #//.parents (list) profile) - parents)))) + (in (list\fold (function (_ parent child) + (\ //.monoid compose child parent)) + (set@ #//.parents (list) profile) + parents)))) #.None - (exception.throw ..unknown_profile [name]))) + (exception.except ..unknown_profile [name]))) (def: #export (profile name project) (-> Name Project (Try Profile)) diff --git a/stdlib/source/program/aedifex/repository.lux b/stdlib/source/program/aedifex/repository.lux index 8f92be270..1ab1e0602 100644 --- a/stdlib/source/program/aedifex/repository.lux +++ b/stdlib/source/program/aedifex/repository.lux @@ -58,10 +58,10 @@ (#try.Success [|state| output]) (do ! [_ (stm.write |state| state)] - (wrap (#try.Success output))) + (in (#try.Success output))) (#try.Failure error) - (wrap (#try.Failure error)))))) + (in (#try.Failure error)))))) (def: (upload uri content) (stm.commit @@ -71,8 +71,8 @@ (#try.Success |state|) (do ! [_ (stm.write |state| state)] - (wrap (#try.Success []))) + (in (#try.Success []))) (#try.Failure error) - (wrap (#try.Failure error)))))) + (in (#try.Failure error)))))) ))) diff --git a/stdlib/source/program/aedifex/repository/local.lux b/stdlib/source/program/aedifex/repository/local.lux index 4620a1363..db9395c09 100644 --- a/stdlib/source/program/aedifex/repository/local.lux +++ b/stdlib/source/program/aedifex/repository/local.lux @@ -51,12 +51,12 @@ [#let [absolute_path (..absolute_path program (\ fs separator) uri)] ? (\ fs file? absolute_path) _ (if ? - (wrap []) + (in []) (case (file.parent fs absolute_path) (#.Some parent) (file.make_directories async.monad fs parent) _ (let [! (try.with async.monad)] - (\ ! wrap []))))] + (\ ! in []))))] (\ fs write content absolute_path)))) diff --git a/stdlib/source/program/aedifex/repository/remote.lux b/stdlib/source/program/aedifex/repository/remote.lux index 118085389..76363c94f 100644 --- a/stdlib/source/program/aedifex/repository/remote.lux +++ b/stdlib/source/program/aedifex/repository/remote.lux @@ -73,7 +73,7 @@ _ (do ! [_ ((get@ #@http.body message) (#.Some 0))] - (\ io.monad wrap (exception.throw ..download_failure [(format address uri) status])))))) + (\ io.monad in (exception.except ..download_failure [(format address uri) status])))))) (def: (upload uri content) (do (try.with io.monad) @@ -91,8 +91,8 @@ _ ((get@ #@http.body message) (#.Some 0))] (case status (^ (static http/status.created)) - (wrap []) + (in []) _ - (\ io.monad wrap (exception.throw ..upload_failure [(format address uri) status]))))) + (\ io.monad in (exception.except ..upload_failure [(format address uri) status]))))) ) diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux index 8d9874216..c804d86b0 100644 --- a/stdlib/source/program/compositor.lux +++ b/stdlib/source/program/compositor.lux @@ -70,7 +70,7 @@ (io.run (\ world/program.default exit +1))) (#try.Success output) - (wrap output)))) + (in output)))) (def: (timed process) (All [a] @@ -82,7 +82,7 @@ (instant.span start) %.duration (format "Duration: ")))]] - (wrap output))) + (in output))) (def: (package! fs host_dependencies [packager package] static archive context) (-> (file.System Async) (Dictionary file.Path Binary) [Packager file.Path] Static Archive Context (Async (Try Any))) @@ -91,7 +91,7 @@ (\ fs write content package) (#try.Failure error) - (\ async.monad wrap (#try.Failure error)))) + (\ async.monad in (#try.Failure error)))) (def: (load_host_dependencies fs host_dependencies) (-> (file.System Async) (List file.Path) (Async (Try (Dictionary file.Path Binary)))) @@ -102,7 +102,7 @@ (dictionary.new text.hash))] (case pending #.Nil - (wrap output) + (in output) (#.Cons head tail) (do ! @@ -152,7 +152,7 @@ (Async (Try [Archive (directive.State+ <parameters>)])) (:assume (platform.compile import static expander platform compilation [archive state]))) _ (ioW.freeze (get@ #platform.&file_system platform) static archive) - program_context (async\wrap ($/program.context archive)) + program_context (async\in ($/program.context archive)) host_dependencies (..load_host_dependencies (get@ #platform.&file_system platform) compilation_host_dependencies) _ (..package! (for {@.old (file.async file.default) @.jvm (file.async file.default) @@ -162,14 +162,14 @@ static archive program_context)] - (wrap (debug.log! "Compilation complete!")))) + (in (debug.log! "Compilation complete!")))) (#/cli.Export export) (<| (or_crash! "Export failed:") (do (try.with async.monad) [_ (/export.export (get@ #platform.&file_system platform) export)] - (wrap (debug.log! "Export complete!")))) + (in (debug.log! "Export complete!")))) (#/cli.Interpretation interpretation) ## TODO: Fix the interpreter... diff --git a/stdlib/source/program/compositor/export.lux b/stdlib/source/program/compositor/export.lux index f17feaf22..46cf9c8ec 100644 --- a/stdlib/source/program/compositor/export.lux +++ b/stdlib/source/program/compositor/export.lux @@ -51,16 +51,16 @@ (text.replace_all (\ fs separator) .module_separator) tar.path) source_code (tar.content source_code)] - (wrap (#tar.Normal [path - (instant.of_millis +0) - ($_ tar.and - tar.read_by_owner tar.write_by_owner - tar.read_by_group tar.write_by_group - tar.read_by_other) - ..no_ownership - source_code]))))) + (in (#tar.Normal [path + (instant.of_millis +0) + ($_ tar.and + tar.read_by_owner tar.write_by_owner + tar.read_by_group tar.write_by_group + tar.read_by_other) + ..no_ownership + source_code]))))) (\ try.monad map row.of_list) - (\ async.monad wrap)))) + (\ async.monad in)))) (def: #export (export fs [sources target]) (-> (file.System Async) Export (Async (Try Any))) diff --git a/stdlib/source/program/compositor/import.lux b/stdlib/source/program/compositor/import.lux index db46d6c13..1e9145bdb 100644 --- a/stdlib/source/program/compositor/import.lux +++ b/stdlib/source/program/compositor/import.lux @@ -57,13 +57,13 @@ (let [path (tar.from_path path)] (case (dictionary.try_put path (tar.data content) import) (#try.Failure error) - (exception.throw ..duplicate [library path]) + (exception.except ..duplicate [library path]) import' import')) _ - (exception.throw ..useless_tar_entry []))) + (exception.except ..useless_tar_entry []))) import))) (\ ! join))))))) 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!) |