Text

String I/O functions The API of this module is unstable and not meant to be consumed by the general public. If you absolutely must depend on it, make sure to use a tight upper bound, e.g., base < 4.X rather than base < 5, because the interface can change rapidly without much warning.
Show the text as is.
A time and space-efficient implementation of Unicode text. Suitable for performance critical use, both in terms of large data quantities and high speed. Note: Read below the synopsis for important notes on the use of this module. This module is intended to be imported qualified, to avoid name clashes with Prelude functions, e.g.
import qualified Data.Text as T
To use an extended and very rich family of functions for working with Unicode text (including normalization, regular expressions, non-standard encodings, text breaking, and locales), see the text-icu package.
A space efficient, packed, unboxed Unicode text type.
Parser from strict Text to Tokens.
Most frequently, you'll probably want to encode straight to UTF-8 (the standard JSON encoding) using encode. You can use the conversions to Builders when embedding JSON messages as parts of a protocol.
Text-based test controller for running HUnit tests and reporting results as text, usually to a terminal.
Convenience definitions for working with Text.
Simple, efficient combinator parsing for Text strings, loosely based on the Parsec library.
"Scrap your boilerplate" --- Generic programming in Haskell See http://www.cs.uu.nl/wiki/GenericProgramming/SYB. The present module provides generic operations for text serialisation of terms.
Convenience alias for Data.Generics.Text.
A module to represent text with very basic formatting. Values are of type [Text] and shown with showText. As an example of the formatting:
[Line "Cooking for hungry people."
,Line "Welcome to my cookery recipe program, I sure hope you enjoy using it!"
,Line ""
,Cols ["Omlette","  A tasty eggy treat."]
,Cols ["  -m"," --mushrooms","  Some mushrooms, or in fact any other ingredients you have in the cupboards"]
,Cols ["  -e"," --eggs", "  But always you need eggs"]
,Line ""
,Cols ["Spagetti Bolognaise", "  An Italian delight."]
,Cols ["  -s"," --spagetti","  The first word in the name"]
,Cols ["  -b"," --bolognaise","  The second word in the name"]
,Cols ["  -d"," --dolmio","  The magic ingredient!"]
,Line ""
,Line "    The author of this program explicitly disclaims any liability for poisoning people who get their recipes off the internet."]
With putStrLn (showText (Wrap 50) demo) gives:
Cooking for hungry people.
Welcome to my cookery recipe program, I sure hope
you enjoy using it!

Omlette              A tasty eggy treat.
-m --mushrooms   Some mushrooms, or in fact
any other ingredients you have
in the cupboards
-e --eggs        But always you need eggs

Spagetti Bolognaise  An Italian delight.
-s --spagetti    The first word in the name
-b --bolognaise  The second word in the name
-d --dolmio      The magic ingredient!

The author of this program explicitly
disclaims any liability for poisoning people
who get their recipes off the internet.
The data type representing some text, typically used as [Text]. The formatting is described by:
  • Line values represent a paragraph of text, and may be wrapped depending on the TextFormat. If a Line value is wrapped then all leading space will be treated as an indent.
  • Cols values represent columns of text. Within any [Text] all columns of the same length are grouped in tabs, with the final column being wrapped if necessary. All columns are placed adjacent with no space between them - for this reason most columns will start with a space.
Deprecated: Use Prettyprinter.Render.Text instead.
Invariants: at least two characters long, does not contain 'n'. For empty documents, there is Empty; for singleton documents, there is Char; newlines should be replaced by e.g. Line. Since the frequently used length of Text is O(length), we cache it in this constructor.
Render an unannotated SimpleDocStream as plain Text.