1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
|
cabal-version: 3.0
name: text-builder
version: 1.0.0.4
category: Text, Builders
synopsis: Efficient and flexible strict text builder
description:
= Summary
Fast strict text builder and simple type-safe formatting library.
== The Builder
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.
== Simple and type-safe formatting library
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](https://hackage.haskell.org/package/formatting)\" library.
== Quality
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\".
= Ecosystem
Following is a list of libraries that, alongside this one, make an integrated ecosystem:
- "[text-builder-time](https://hackage.haskell.org/package/text-builder-time)" - formatters for the "time" library
- "[text-builder-core](https://hackage.haskell.org/package/text-builder-core)" - lower-level unsafe constructs for implementing efficient formatters compatible with this library
- "[text-builder-dev](https://hackage.haskell.org/package/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](https://hackage.haskell.org/package/text-builder-lawful-conversions)" - integration with the \"lawful-conversions\" library, providing bidirectional conversions with various types including `String`, `Data.Text.Text`, `Data.Text.Lazy.Text`, `Data.Text.Lazy.Builder.Builder`, `Data.Text.Encoding.StrictTextBuilder`.
homepage: https://github.com/nikita-volkov/text-builder
bug-reports: https://github.com/nikita-volkov/text-builder/issues
author: Nikita Volkov <nikita.y.volkov@mail.ru>
maintainer: Nikita Volkov <nikita.y.volkov@mail.ru>
copyright: (c) 2017, Nikita Volkov
license: MIT
license-file: LICENSE
extra-doc-files:
CHANGELOG.md
LICENSE
README.md
source-repository head
type: git
location: https://github.com/nikita-volkov/text-builder
common base
default-language: Haskell2010
default-extensions:
BangPatterns
BlockArguments
ConstraintKinds
DataKinds
DefaultSignatures
DeriveDataTypeable
DeriveFoldable
DeriveFunctor
DeriveGeneric
DeriveTraversable
DerivingStrategies
EmptyDataDecls
FlexibleContexts
FlexibleInstances
FunctionalDependencies
GADTs
GeneralizedNewtypeDeriving
LambdaCase
LiberalTypeSynonyms
MagicHash
MultiParamTypeClasses
MultiWayIf
NoImplicitPrelude
NoMonomorphismRestriction
NumericUnderscores
OverloadedStrings
ParallelListComp
PatternGuards
QuasiQuotes
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
StrictData
TemplateHaskell
TupleSections
TypeApplications
TypeFamilies
TypeOperators
UnboxedTuples
ViewPatterns
library
import: base
hs-source-dirs: library
exposed-modules: TextBuilder
other-modules:
TextBuilder.Domains.ByteString
TextBuilder.Domains.Combinators
TextBuilder.Domains.Digits
TextBuilder.Domains.Digits.Codepoints
TextBuilder.Domains.Other
TextBuilder.Prelude
build-depends:
base >=4.11 && <5,
bytestring >=0.10 && <0.13,
text >=1.2 && <3,
text-builder-core ^>=0.1.1.1,
time >=1.12 && <2,
transformers >=0.5 && <0.7,
test-suite test
import: base
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Main.hs
other-modules:
Util.ExtraInstances
Util.TestTrees
build-depends:
QuickCheck >=2.14 && <3,
base >=4.11 && <5,
bytestring >=0.10 && <0.13,
quickcheck-classes >=0.6.5 && <0.7,
quickcheck-instances >=0.3.32 && <0.4,
tasty >=1.5.3 && <2,
tasty-quickcheck >=0.11.1 && <0.12,
text >=1.2 && <3,
text-builder,
benchmark bench
import: base
type: exitcode-stdio-1.0
hs-source-dirs: bench
ghc-options:
-O2
-threaded
-with-rtsopts=-N
-with-rtsopts=-A32m
-with-rtsopts=-T
-fproc-alignment=64
main-is: Main.hs
build-depends:
base >=4.11 && <5,
tasty-bench ^>=0.4.1,
text >=2.1.2 && <3,
text-builder,
text-builder-linear ^>=0.1.3,
|