@@ -374,6 +374,12 @@ module Solver = struct
374
374
| VirtualImpl (_ , deps ) -> deps
375
375
| RealImpl impl -> impl.requires
376
376
;;
377
+
378
+ let conflict_class = function
379
+ | RealImpl impl -> OpamFile.OPAM. conflict_class impl.opam
380
+ | VirtualImpl _ -> []
381
+ | Dummy | Reject _ -> []
382
+ ;;
377
383
end
378
384
379
385
let role context name = Real { context; name }
@@ -446,12 +452,6 @@ module Solver = struct
446
452
end )
447
453
end
448
454
449
- let conflict_class = function
450
- | RealImpl impl -> OpamFile.OPAM. conflict_class impl.opam
451
- | VirtualImpl _ -> []
452
- | Dummy | Reject _ -> []
453
- ;;
454
-
455
455
(* Opam uses conflicts, e.g.
456
456
conflicts if X {> 1} OR Y {< 1 OR > 2}
457
457
whereas 0install uses restricts, e.g.
@@ -661,7 +661,7 @@ module Solver = struct
661
661
662
662
(* Add [impl] to its conflict groups, if any. *)
663
663
let process t impl_var impl =
664
- Input. conflict_class impl
664
+ Input.Impl. conflict_class impl
665
665
|> List. iter ~f: (fun name ->
666
666
let impls = var t name in
667
667
impls := impl_var :: ! impls)
@@ -1198,7 +1198,7 @@ module Solver = struct
1198
1198
match Component. selected_impl component with
1199
1199
| None -> acc
1200
1200
| Some impl ->
1201
- Input. conflict_class impl
1201
+ Input.Impl. conflict_class impl
1202
1202
|> List. fold_left ~init: acc ~f: (fun acc x ->
1203
1203
Input.Conflict_class.Map. set acc x role))
1204
1204
in
@@ -1213,7 +1213,7 @@ module Solver = struct
1213
1213
Some (`ClassConflict (other_role, cl))
1214
1214
| _ -> aux cls)
1215
1215
in
1216
- aux (Input. conflict_class impl)))
1216
+ aux (Input.Impl. conflict_class impl)))
1217
1217
;;
1218
1218
1219
1219
let of_result impls =
0 commit comments