text-builder
Fast strict text builder and simple type-safe formatting library. The builder abstraction provided by this library is much faster than the standard lazy Builder and even the recently introduced StrictTextBuilder from "text". Benchmarks are distributed with the source code. You can see the results in the README file. The abstraction constructs text in two phases. In the first one it estimates the size of the byte array and in the second one it allocates it once and populates it in one go. The monoidal API of the library provides a simple yet type-safe alternative to formatting strings via printf-like tools or more involved solutions like the popular "formatting" library. Every bit of the library is heavily covered with tests with CI running tests on a variety of versions of GHC and the "text" library. This is crucial because the "text" library has made a switch from UTF-16 to UTF-8, leading to drastic changes in its low-level constructs, which builder libraries must rely on, and this library supports both versions of "text". Following is a list of libraries that, alongside this one, make an integrated ecosystem: "text-builder-time" - formatters for the "time" library "text-builder-core" - lower-level unsafe constructs for implementing efficient formatters compatible with this library "text-builder-dev" - edge of development of new features providing a richer functionality at the cost of more frequent major releases "text-builder-lawful-conversions" - integration with the "lawful-conversions" library, providing bidirectional conversions with various textual and builder types.
hackage.haskell.org
0.6.10
11 months ago
43
24,663 total
12
21
Links
| Registry | hackage.haskell.org |
| Source | Repository |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:hackage/text-builder
spec |
| License | MIT |
| First Release | about 9 years ago |
| Last Synced | 22 days ago |