ord -package:sbv -package:BNFC-meta -package:first-class-families package:linear-base

Linear Orderings Linear orderings provide a strict order. The laws for (<=) for all <math>:
  • reflexivity: <math>
  • antisymmetry: <math>
  • transitivity: <math>
and these "agree" with <:
  • x <= y = not (y > x)
  • x >= y = not (y < x)
Unlike in the non-linear setting, a linear compare doesn't follow from <= since it requires calls: one to <= and one to ==. However, from a linear compare it is easy to implement the others. Hence, the minimal complete definition only contains compare.
A Word is an unsigned integral type, with the same size as Int.
Remove repeated elements from a Stream. nubOrd of course accumulates a Set of elements that have already been seen and should thus be used with care.
Use nubOrdOn to have a custom ordering function for your elements.