From ee89fb8bd87382b32feaff23ed065a203ac49b56 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 14 Jan 2025 13:03:02 +0000 Subject: [PATCH] refactor(pkg): remove polymorphic comparison (#11287) Signed-off-by: Rudi Grinberg --- src/0install-solver/sat.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/0install-solver/sat.ml b/src/0install-solver/sat.ml index f737aa032fe..c70990f888d 100644 --- a/src/0install-solver/sat.ml +++ b/src/0install-solver/sat.ml @@ -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)