|
System.Console.Terminfo.Base | Portability | portable (FFI) | Stability | experimental | Maintainer | judah.jacobson@gmail.com |
|
|
|
|
|
Description |
This module provides a low-level interface to the C functions of the
terminfo library.
NOTE: Since this library is built on top of the curses interface, it is not thread-safe.
|
|
Synopsis |
|
|
|
|
Initialization
|
|
|
|
|
Initialize the terminfo library to the given terminal entry.
Throws a SetupTermError if the terminfo database could not be read.
|
|
|
Initialize the terminfo library, using the TERM environmental variable.
If TERM is not set, we use the generic, minimal entry dumb.
Throws a SetupTermError if the terminfo database could not be read.
|
|
|
|
Capabilities
|
|
|
A feature or operation which a Terminal may define.
|
|
|
|
|
|
Look up a boolean capability in the terminfo database.
Unlike tiGuardFlag, this capability never fails; it returns False if the
capability is absent or set to false, and returns True otherwise.
|
|
|
Look up a boolean capability in the terminfo database, and fail if
it's not defined.
|
|
|
Look up a numeric capability in the terminfo database.
|
|
|
Look up a string capability in the terminfo database.
Note: Do not use this function for terminal output; use tiGetOutput
instead.
|
|
Output
|
|
|
An action which sends output to the terminal. That output may mix plain text with control
characters and escape sequences, along with delays (called "padding") required by some older
terminals.
|
|
|
|
Write the terminal output to the standard output device.
|
|
|
Write the terminal output to the terminal or file managed by the given
Handle.
|
|
|
Output plain text containing no control characters or escape sequences.
|
|
|
Look up an output capability in the terminfo database.
|
|
|
A parameter to specify the number of lines affected. Some capabilities
(e.g., clear and dch1) use
this parameter on some terminals to compute variable-length padding.
|
|
|
Look up an output capability which takes a fixed number of parameters
(for example, Int -> Int -> TermOutput).
For capabilities which may contain variable-length
padding, use tiGetOutput instead.
|
|
|
A type class to encapsulate capabilities which take in zero or more
parameters.
|
|
|
Monoid functions
|
|
|
The class of monoids (types with an associative binary operation that
has an identity). Instances should satisfy the following laws:
- mappend mempty x = x
- mappend x mempty = x
- mappend x (mappend y z) = mappend (mappend x y) z
- mconcat = foldr mappend mempty
The method names refer to the monoid of lists under concatenation,
but there are many other instances.
Minimal complete definition: mempty and mappend.
Some types can be viewed as a monoid in more than one way,
e.g. both addition and multiplication on numbers.
In such cases we often define newtypes and make those instances
of Monoid, e.g. Sum and Product.
| | Methods | | Identity of mappend
| | | An associative operation
| | | Fold a list using the monoid.
For most types, the default definition for mconcat will be
used, but the function is included in the class definition so
that an optimized version can be provided for specific types.
|
|
|
|
|
An operator version of mappend.
|
|
Produced by Haddock version 2.6.0 |