| Copyright | (c) 2020 Emily Pillmore |
|---|---|
| License | BSD-style |
| Maintainer | Emily Pillmore <emilypi@cohomolo.gy> |
| Stability | Experimental |
| Portability | non-portable |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Data.Text.Encoding.Base32.Lens
Description
This module contains Prisms Base32-encoding and
decoding Text values.
Synopsis
- _Base32 :: Prism' Text Text
- _Base32Unpadded :: Prism' Text Text
- _Base32Hex :: Prism' Text Text
- _Base32HexUnpadded :: Prism' Text Text
- pattern Base32 :: Text -> Text
- pattern Base32Unpadded :: Text -> Text
- pattern Base32Hex :: Text -> Text
- pattern Base32HexUnpadded :: Text -> Text
Prisms
_Base32 :: Prism' Text Text Source #
A Prism into the Base32 encoding of a Text value.
>>>_Base32 # "Sun""KN2W4==="
>>>"KN2W4===" ^? _Base32Just "Sun"
_Base32Unpadded :: Prism' Text Text Source #
A Prism into the Base32 encoding of a Text value.
Please note that unpadded variants should only be used when assumptions about the data can be made. In particular, if the length of the input is divisible by 3, then this is a safe function to call.
>>>_Base32Unpadded # "Sun""KN2W4"
>>>"KN2W4" ^? _Base32UnpaddedJust "Sun"
_Base32Hex :: Prism' Text Text Source #
A Prism into the Base32-hex encoding of a Text value.
>>>_Base32Hex # "Sun""ADQMS==="
>>>"ADQMS===" ^? _Base32HexJust "Sun"
_Base32HexUnpadded :: Prism' Text Text Source #
A Prism into the Base32-hex encoding of a Text value.
Please note that unpadded variants should only be used when assumptions about the data can be made. In particular, if the length of the input is divisible by 3, then this is a safe function to call.
>>>_Base32HexUnpadded # "Sun""ADQMS"
>>>"ADQMS" ^? _Base32HexUnpaddedJust "Sun"
Patterns
pattern Base32 :: Text -> Text Source #
Unidirectional pattern synonym for Base32-encoded Text values.
pattern Base32Unpadded :: Text -> Text Source #
Unidirectional pattern synonym for unpadded Base32-encoded Text values.