Int_replace_...rphic_compare(3)

🌸 NAME 🌸

Int_replace_polymorphic_compare β€” okay so bestie, the official description here is literally just "no description" πŸ’€ which is iconic of the OCaml docs tbh, but don't worry, we're gonna walk through it together πŸ’–

This page lives in the OCaml library manual, and it's filed under Int_replace_...rphic_compare(3) β€” yes the title is truncated, no that's not a typo, that's just how the header line rolls πŸ™ˆ


πŸŽ€ MODULE πŸŽ€

The one and only module you're here for:

Module Int_replace_polymorphic_compare

Like, that's it. That's the module. She's a whole module and she said what she said ✨


πŸ’… DOCUMENTATION πŸ’…

Here's the full signature, bestie β€” it declares the module and then just… ends, which honestly? Mood:

Module Int_replace_polymorphic_compare
 : sig end

So it's a sig end β€” an empty signature, meaning the module itself exports nothing extra beyond what's written below. Then we get into the actual values, and ngl, they're giving comparison operators but make them int-specific πŸ‘‘

πŸ¦‹ the values, one by one πŸ¦‹

  • val (=) : int -> int -> bool β€” the equality operator, typed up just for ints. Takes two ints, hands you a bool. Slay ✨
  • val (<>) : int -> int -> bool β€” the not-equal operator, same deal: two ints in, a bool out 🫢
  • val (<) : int -> int -> bool β€” less-than, but typed for int. She's clean, she's specific, she's literally doing her job πŸ’–
  • val (>) : int -> int -> bool β€” greater-than, for ints only. Periodt πŸŽ€
  • val (<=) : int -> int -> bool β€” less-than-or-equal, int -> int -> bool, no cap 🌈
  • val (>=) : int -> int -> bool β€” greater-than-or-equal, int -> int -> bool, and that's that πŸ’…
  • val compare : int -> int -> int β€” the big one: compare takes two ints and gives you back an int (the classic negative/zero/positive ordering thing). Main character energy fr fr πŸ”₯
Heads up bestie: these are the polymorphic-comparison-replacement operators for int, and their signatures are written out exactly as they appear β€” so don't go calling them with floats, okay? The types are literally right there 😭 int -> int -> bool, every single time. The details are not the vibe to mess with.

That's the whole page, honestly. Short and sweet, just like a good group chat message πŸ’œ

sign-off, mwah β€” this cutie was rendered by OCamldoc, dated 2026-06-22, and the manual still calls her Int_replace_...rphic_compare(3) because apparently full names are too much to ask πŸ§šβ€β™€οΈπŸ’«

πŸ“¦ where this page comes from