Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides Iso
s for converting strict or lazy Text
to or from a
String
or Builder
, and an IxTraversal
for traversing the individual
characters of a Text
.
The same combinators support both strict and lazy text using the IsText
typeclass. You can import Data.Text.Strict.Optics or
Data.Text.Lazy.Optics instead if you prefer monomorphic versions.
Documentation
Traversals for strict or lazy Text
packed :: Iso' String t Source #
This isomorphism can be used to pack
(or unpack
) strict or lazy
Text
.
pack
x ≡ x^.
packed
unpack
x ≡ x^.
re
packed
packed
≡re
unpacked