deftrait Ordering as: ->
# This trait defines ordering comparisons for types.
def <Ordering::Result> compare_with other: Any
def equals? other: Any, as: ->
Huia::Primitive.match(self.compare_with(other), {
Ordering::Equal: true,
Any: false
})
end
def greater_than? other: Any, as: ->
Ordering::Greater: true,
def greater_than_or_equal_to? other: Any, as: ->
def less_than? other: Any, as: ->
Ordering::Less: true,
def less_than_or_equal_to? other: Any, as: ->