 | hledger-lib-0.14: Reusable types and utilities for the hledger accounting tool and financial apps in general. | Source code | Contents | Index |
|
|
|
| Description |
| Standard imports and utilities which are useful everywhere, or needed low
in the module hierarchy. This is the bottom of hledger's module graph.
|
|
| Synopsis |
|
|
|
| Documentation |
|
| module Data.Char |
|
| module Control.Monad |
|
| module Data.List |
|
| module Data.Maybe |
|
| module Data.Ord |
|
| module Data.Tree |
|
| module Data.Time.Clock |
|
| module Data.Time.Calendar |
|
| module Data.Time.LocalTime |
|
| module Debug.Trace |
|
|
|
|
|
|
| Join multi-line strings as side-by-side rectangular strings of the same height, top-padded.
|
|
|
| Join multi-line strings as side-by-side rectangular strings of the same height, bottom-padded.
|
|
|
| Compose strings vertically and right-aligned.
|
|
|
| Convert a multi-line string to a rectangular string top-padded to the specified height.
|
|
|
| Convert a multi-line string to a rectangular string bottom-padded to the specified height.
|
|
|
| Convert a multi-line string to a rectangular string left-padded to the specified width.
|
|
|
| Convert a multi-line string to a rectangular string right-padded to the specified width.
|
|
|
| Clip a multi-line string to the specified width and height from the top left.
|
|
|
| Clip and pad a multi-line string to fill the specified width and height.
|
|
|
| A platform string is a string value from or for the operating system,
such as a file path or command-line argument (or environment variable's
name or value ?). On some platforms (such as unix) these are not real
unicode strings but have some encoding such as UTF-8. This alias does
no type enforcement but aids code clarity.
|
|
|
| Convert a possibly encoded platform string to a real unicode string.
We decode the UTF-8 encoding recommended for unix systems
(cf http:www.dwheeler.comessaysfixing-unix-linux-filenames.html)
and leave anything else unchanged.
|
|
|
| Convert a unicode string to a possibly encoded platform string.
On unix we encode with the recommended UTF-8
(cf http:www.dwheeler.comessaysfixing-unix-linux-filenames.html)
and elsewhere we leave it unchanged.
|
|
|
| A version of error that's better at displaying unicode.
|
|
|
| A version of userError that's better at displaying unicode.
|
|
|
|
|
|
| splitAtElement :: Eq a => a -> [a] -> [[a]] | Source |
|
|
|
| List just the leaf nodes of a tree
|
|
|
| get the sub-tree rooted at the first (left-most, depth-first) occurrence
of the specified node value
|
|
|
| get the sub-tree for the specified node value in the first tree in
forest in which it occurs.
|
|
|
| remove all nodes past a certain depth
|
|
|
| apply f to all tree nodes
|
|
|
| remove all subtrees whose nodes do not fulfill predicate
|
|
|
| is predicate true in any node of tree ?
|
|
|
| show a compact ascii representation of a tree
|
|
|
| show a compact ascii representation of a forest
|
|
|
| trace (print on stdout at runtime) a showable expression
(for easily tracing in the middle of a complex expression)
|
|
|
| labelled trace - like strace, with a label prepended
|
|
|
| monadic trace - like strace, but works as a standalone line in a monad
|
|
|
| trace an expression using a custom show function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Get a Test's label, or the empty string.
|
|
|
| Flatten a Test containing TestLists into a list of single tests.
|
|
|
| Filter TestLists in a Test, recursively, preserving the structure.
|
|
|
| Simple way to assert something is some expected value, with no label.
|
|
|
| Assert a parse result is successful, printing the parse error on failure.
|
|
|
| Assert a parse result is some expected value, printing the parse error on failure.
|
|
|
|
|
|
|
|
|
| Apply a function the specified number of times. Possibly uses O(n) stack ?
|
|
| module Text.Printf |
|
| module Text.RegexPR |
|
| module Test.HUnit |
|
| Produced by Haddock version 2.6.1 |