Copyright | (c) 2019-2020 Emily Pillmore |
---|---|
License | BSD-style |
Maintainer | Emily Pillmore <emilypi@cohomolo.gy> |
Stability | Experimental |
Portability | non-portable |
Safe Haskell | Safe |
Language | Haskell2010 |
This module contains Prism'
s and Iso'
s for Base16-encoding and
decoding ByteString
values.
Synopsis
- _Hex :: Prism' ByteString ByteString
- _Base16 :: Prism' ByteString ByteString
- _Base16Lenient :: Iso' ByteString ByteString
- pattern Hex :: ByteString -> ByteString
- pattern Base16 :: ByteString -> ByteString
- pattern Base16Lenient :: ByteString -> ByteString
Prisms
_Hex :: Prism' ByteString ByteString Source #
A Prism'
into the Base16 encoding of a ByteString
value. This is an
alias for _Base16
.
>>>
_Hex # "Sun"
"53756e"
>>>
"53756e" ^? _Hex
Just "Sun"
_Base16 :: Prism' ByteString ByteString Source #
A Prism'
into the Base16 encoding of a ByteString
value.
>>>
_Base16 # "Sun"
"53756e"
>>>
"53756e" ^? _Base16
Just "Sun"
Isos
_Base16Lenient :: Iso' ByteString ByteString Source #
A Iso'
into the Base16 encoding of a leniently decoded
ByteString
value.
>>>
_Base16Lenient # "Sun"
"53756e"
>>>
"53756e" ^. _Base16Lenient
"Sun"
Patterns
pattern Hex :: ByteString -> ByteString Source #
Bidirectional pattern synonym for Base16-encoded ByteString
values.
pattern Base16 :: ByteString -> ByteString Source #
Bidirectional pattern synonym for Base16-encoded ByteString
values.
pattern Base16Lenient :: ByteString -> ByteString Source #
Bidirectional pattern synonym for leniently decoded,
Base16-encoded ByteString
values.