Skip to content

Commit

Permalink
refactor(pkg): remove polymorphic comparison (#11287)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg authored Jan 14, 2025
1 parent 3a1ce74 commit ee89fb8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/0install-solver/sat.ml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,12 @@ module Make (User : USER) = struct

let compare (s1, v1) (s2, v2) =
match VarID.compare v1.id v2.id with
| Eq -> Poly.compare s1 s2
| Eq ->
(match s1, s2 with
| Pos, Pos -> Eq
| Pos, _ -> Gt
| _, Pos -> Lt
| Neg, Neg -> Eq)
| x -> x
;;
end)
Expand Down

0 comments on commit ee89fb8

Please sign in to comment.