Non Empty Text
Typesafe thin wrapper around
Data.Text to make impossible to be empty (to
always hold at least on character)
- Typesafe wrapper around Text
Data.NonEmptyTextback and forth conversion.
- Basic functions:
- Text equivalent of
- Transformations (most importantly
- Case conversions
- Folds (especially, total
For now all of this can be done by calling
toText, however the
doesn't ensure that all of this functions return
Another solution is to use
fromText . <function> . toText, but this forces
the programmer to handle the
Nothing case, which is for many of these functions
Why not text1?
text1 basically does the same
thing than this package, and even more. It's also a great package.
However text1 has a lot of dependencies, and use an alternative homebrewed prelude.
non-empty-text is aiming towards a minimal, thin wrapper. The goal is to do
the same thing as the
base as dependencies, no extension.