Ord -package:basic-prelude package:termonad

The Ord class is used for totally ordered datatypes. Instances of Ord can be derived for any user-defined datatype whose constituent types are in Ord. The declared order of the constructors in the data declaration determines the ordering in derived Ord instances. The Ordering datatype allows a single comparison to determine the precise ordering of two objects. Ord, as defined by the Haskell report, implements a total order and has the following properties:
  • Comparability x <= y || y <= x = True
  • Transitivity if x <= y && y <= z = True, then x <= z = True
  • Reflexivity x <= x = True
  • Antisymmetry if x <= y && y <= x = True, then x == y = True
The following operator interactions are expected to hold:
  1. x >= y = y <= x
  2. x < y = x <= y && x /= y
  3. x > y = y < x
  4. x < y = compare x y == LT
  5. x > y = compare x y == GT
  6. x == y = compare x y == EQ
  7. min x y == if x <= y then x else y = True
  8. max x y == if x >= y then x else y = True
Note that (7.) and (8.) do not require min and max to return either of their arguments. The result is merely required to equal one of the arguments in terms of (==). Minimal complete definition: either compare or <=. Using compare can be more efficient for complex types.
same behavior as nub, but requires Ord and is O(n log n) https://github.com/nh2/haskell-ordnub
same behavior as nubBy, but requires Ord and is O(n log n) https://github.com/nh2/haskell-ordnub
When double-clicking on text in the terminal with the mouse, Termonad will use this value to determine what to highlight. The individual characters in this list will be counted as part of a word. For instance if wordCharExceptions is "", then when you double-click on the text http://, only the http portion will be highlighted. If wordCharExceptions is ":", then the http: portion will be highlighted.
A Word is an unsigned integral type, with the same size as Int.
32-bit unsigned integer type
64-bit unsigned integer type
8-bit unsigned integer type
Split a textual sequence into two parts, split at the first space.
> breakWord "hello world"
("hello","world")
Join a list of textual sequences using seperating spaces.
> unwords ["abc","def","ghi"]
"abc def ghi"
Break up a textual sequence into a list of words, which were delimited by white space.
> words "abc  def ghi"
["abc","def","ghi"]