diff options
author | Eduardo Julian | 2021-06-18 14:21:41 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-06-18 14:21:41 -0400 |
commit | a82bd1eabe94763162c2b0707d9c198fbe9835e3 (patch) | |
tree | 032473704af6e7db41e1f6dc87ab995788d8ab17 /stdlib/source/program/aedifex/dependency | |
parent | 519c0c0c71cdf7ce3dfc64b9781ab826760b3d94 (diff) |
Refactored the machinery to make local macros into its own module.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/dependency/resolution.lux | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index 89ad6368f..2d92e1438 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -196,7 +196,7 @@ failures tail resolution) - _ (do promise.monad + _ (do {! promise.monad} [?package (case (dictionary.get head resolution) (#.Some package) (wrap (#try.Success package)) @@ -205,23 +205,32 @@ (..any repositories head))] (case ?package (#try.Success package) - (let [sub_dependencies (|> package - ///package.dependencies - (try\map set.to_list) - (try.default (list))) - sub_repositories (|> package - ///package.repositories - (try\map set.to_list) - (try.default (list)) - (list\map (|>> (///repository/remote.repository #.None) - ///repository.async)) - (list\compose repositories))] - (|> resolution - (dictionary.put head package) - (recur sub_repositories - (#.Cons head successes) - failures - sub_dependencies))) + (do ! + [#let [sub_dependencies (|> package + ///package.dependencies + (try\map set.to_list) + (try.default (list))) + sub_repositories (|> package + ///package.repositories + (try\map set.to_list) + (try.default (list)) + (list\map (|>> (///repository/remote.repository #.None) + ///repository.async)) + (list\compose repositories))] + [successes failures resolution] (recur sub_repositories + (#.Cons head successes) + failures + sub_dependencies + (dictionary.put head package resolution))] + (recur repositories + successes + failures + tail + resolution)) (#try.Failure error) - (wrap [successes (#.Cons head failures) resolution]))))))) + (recur repositories + successes + (#.Cons head failures) + tail + resolution))))))) |