lens-5.0.1: Lenses, Folds and Traversals
Copyright (C) 2012-16 Edward Kmett
License BSD-style (see the file LICENSE)
Maintainer Edward Kmett <ekmett@gmail.com>
Stability experimental
Portability non-portable
Safe Haskell None
Language Haskell2010

Data.Text.Lens

Description

Synopsis

Documentation

unpacked :: IsText t => Iso' t String Source #

This isomorphism can be used to unpack (or pack ) both strict or lazy Text .

unpack x ≡ x ^. unpacked
pack x ≡ x ^. from unpacked

This Iso is provided for notational convenience rather than out of great need, since

unpackedfrom packed

_Text :: IsText t => Iso' t String Source #

This is an alias for unpacked that makes it clearer how to use it with ( # ) .

_Text = from packed
>>> _Text # "hello" :: Strict.Text
"hello"

pattern Text :: IsText s => [ Char ] -> s Source #