let version_compare cmp x y = let d = Version.compare x y in match cmp with | Eq -> d = 0 | Ge -> d >= 0 | Gt -> d > 0 | Le -> d <= 0 | Lt -> d < 0