ord package:Cabal-syntax

The fromEnum method restricted to the type Char.
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.
Like nub, but has O(n log n) complexity instead of O(n^2). Code for ordNub and listUnion taken from Niklas Hambüchen's ordnub package.
Like ordNub and nubBy. Selects a key for each element and takes the nub based on that key.
A right-biased version of ordNub. Example:
>>> ordNub [1,2,1] :: [Int]
[1,2]
>>> ordNubRight [1,2,1] :: [Int]
[2,1]
A Word is an unsigned integral type, with the same size as Int.
16-bit unsigned integer type
32-bit unsigned integer type
64-bit unsigned integer type
8-bit unsigned integer type
unwords joins words with separating spaces (U+0020 SPACE).
>>> unwords ["Lorem", "ipsum", "dolor"]
"Lorem ipsum dolor"
unwords is neither left nor right inverse of words:
>>> words (unwords [" "])
[]

>>> unwords (words "foo\nbar")
"foo bar"
words breaks a string up into a list of words, which were delimited by white space (as defined by isSpace). This function trims any white spaces at the beginning and at the end.
>>> words "Lorem ipsum\ndolor"
["Lorem","ipsum","dolor"]

>>> words " foo bar "
["foo","bar"]
Crossword, Crossword License
A type-level symbolic name, to an abstract file or directory (e.g. the Cabal package directory).
Allow a record field name to be disambiguated by the type of the record it's in.
Allow records to use duplicated field labels for accessors.
Enable the "Trex" extensible records system.
Enable the use of record dot-accessor and updater syntax
Provides record . syntax in record updates, e.g. x {foo.bar = 1}.
Deprecated, use NamedFieldPuns instead.
Enable syntax for implicitly binding local names corresponding to the field names of a record. A wildcard binds all unmentioned names, unlike NamedFieldPuns.
Enable traditional record syntax (as supported by Haskell 98)