Skip to content

Commit

Permalink
Clearer formatting
Browse files Browse the repository at this point in the history
Co-authored-by: R. Boujbel <rjbou@ocamlpro.com>
  • Loading branch information
dra27 and rjbou committed May 25, 2021
1 parent 826cc14 commit e859420
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/solver/opamCudf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -940,12 +940,15 @@ let extract_explanations packages cudfnv2opam unav_reasons reasons =
in

let explanations =
let same_depexts sdeps fdeps =
List.for_all (function
| `Missing (_, sdeps', fdeps') -> sdeps = sdeps' && fdeps = fdeps'
| _ -> false)
in
match explanations with
| `Missing (_, sdeps, fdeps) :: rest
when List.for_all (function `Missing (_, sdeps', fdeps') -> sdeps = sdeps' && fdeps = fdeps' | _ -> false) rest ->
[`Missing (None, sdeps, fdeps)]
| `Missing (_, sdeps, fdeps) :: rest when same_depexts sdeps fdeps rest ->
[`Missing (None, sdeps, fdeps)]
| _ -> explanations

in

let format_explanation = function
Expand Down

0 comments on commit e859420

Please sign in to comment.