par package:base-prelude

A parser for versions in the format produced by showVersion.
The partition function takes a predicate a list and returns the pair of lists of elements which do and do not satisfy the predicate, respectively; i.e.,
partition p xs == (filter p xs, filter (not . p) xs)
>>> partition (`elem` "aeiou") "Hello World!"
("eoo","Hll Wrld!")
Partitions a list of Either into two lists. All the Left elements are extracted, in order, to the first component of the output. Similarly the Right elements are extracted to the second component of the output.

Examples

Basic usage:
>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]

>>> partitionEithers list
(["foo","bar","baz"],[3,7])
The pair returned by partitionEithers x should be the same pair as (lefts x, rights x):
>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]

>>> partitionEithers list == (lefts list, rights list)
True
Zp: Separator, Paragraph
Defines a total ordering on a type as per compare. This condition is not checked by the types. You must ensure that the supplied values are valid total orderings yourself.
Zl: Separator, Line
Lift the standard compare function through the type constructor.
Lift the standard compare function through the type constructor.
comparing p x y = compare (p x) (p y)
Useful combinator for use in conjunction with the xxxBy family of functions from Data.List, for example:
... sortBy (comparing fst) ...
Compare using compare.
Extracts the imaginary part of a complex number.
Selects Unicode space and separator characters. This function returns True if its argument has one of the following GeneralCategorys, or False otherwise: These classes are defined in the Unicode Character Database, part of the Unicode standard. The same document defines what is and is not a "Separator".

Examples

Basic usage:
>>> isSeparator 'a'
False

>>> isSeparator '6'
False

>>> isSeparator ' '
True
Warning: newlines and tab characters are not considered separators.
>>> isSeparator '\n'
False

>>> isSeparator '\t'
False
But some more exotic characters are (like HTML's  ):
>>> isSeparator '\160'
True
Lift a compare function through the type constructor. The function will usually be applied to a comparison function, but the more general type ensures that the implementation uses it to compare elements of the first container with elements of the second.
Lift compare functions through the type constructor. The function will usually be applied to comparison functions, but the more general type ensures that the implementation uses them to compare elements of the first container with elements of the second.
Returns the number of sparks currently in the local spark pool
readParen True p parses what p parses, but surrounded with parentheses. readParen False p parses what p parses, but optionally surrounded with parentheses.
Extracts the real part of a complex number.
Internal function used by the RTS to run sparks.
utility function that surrounds the inner show function with parentheses when the Bool parameter is True.