Skip to content

Commit

Permalink
Merge branch 'ocaml:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain78 authored Jan 2, 2025
2 parents 09ada27 + 8afab37 commit 48672f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
})
else pkgs;

inherit (pkgs') writeScriptBin stdenv lib;
inherit (pkgs') writeScriptBin stdenv;

docInputs = with pkgs'.python3.pkgs; [
sphinx-autobuild
Expand Down
18 changes: 9 additions & 9 deletions src/0install-solver/solver_core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,16 @@ module Make (Model : S.SOLVER_INPUT) = struct
(* For each (iface, source) we have a list of implementations. *)
let impl_cache = ImplCache.create () in
let conflict_classes = Conflict_classes.create sat in
let rec add_impls_to_cache role =
let+ clause, impls = make_impl_clause sat ~dummy_impl role in
( clause
, fun () ->
Fiber.sequential_iter impls ~f:(fun (impl_var, impl) ->
Conflict_classes.process conflict_classes impl_var impl;
Model.requires role impl
|> Fiber.sequential_iter ~f:(process_dep sat lookup_impl impl_var)) )
and lookup_impl key = ImplCache.lookup impl_cache add_impls_to_cache key in
let+ () =
let rec add_impls_to_cache role =
let+ clause, impls = make_impl_clause sat ~dummy_impl role in
( clause
, fun () ->
Fiber.sequential_iter impls ~f:(fun (impl_var, impl) ->
Conflict_classes.process conflict_classes impl_var impl;
Model.requires role impl
|> Fiber.sequential_iter ~f:(process_dep sat lookup_impl impl_var)) )
and lookup_impl key = ImplCache.lookup impl_cache add_impls_to_cache key in
(* This recursively builds the whole problem up. *)
lookup_impl root_req
>>| Candidates.vars
Expand Down

0 comments on commit 48672f5

Please sign in to comment.