base16-lens-0.1.3.0: Optics for the Base16 library

Copyright(c) 2019-2020 Emily Pillmore
LicenseBSD-style
MaintainerEmily Pillmore <emilypi@cohomolo.gy>
StabilityExperimental
Portabilitynon-portable
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Text.Short.Encoding.Base16.Lens

Contents

Description

This module contains Prism's and Iso's Base16-encoding and decoding ShortText values.

Synopsis

Prisms

_Hex :: Prism' ShortText ShortText Source #

A Prism' into the Base16 encoding of a ShortText value. This is an alias for _Base16.

>>> _Hex # "Sun"
"53756e"
>>> "53756e" ^? _Hex
Just "Sun"

_Base16 :: Prism' ShortText ShortText Source #

A Prism' into the Base16 encoding of a ShortText value

>>> _Base16 # "Sun"
"53756e"
>>> "53756e" ^? _Base16
Just "Sun"

_Base16Lenient :: Iso' ShortText ShortText Source #

A Iso' into the Base16 encoding of a ShortText value

>>> _Base16Lenient # "Sun"
"53756e"
>>> "53756e" ^. _Base16Lenient
"Sun"

Patterns

pattern Hex :: ShortText -> ShortText Source #

Bidirectional pattern synonym for Base16-encoded ShortText values.

pattern Base16 :: ShortText -> ShortText Source #

Bidirectional pattern synonym for Base16-encoded ShortText values.

pattern Base16Lenient :: ShortText -> ShortText Source #

Bidirectional pattern synonym for leniently decoded, Base16-encoded ShortText values.