| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
BytePatch.Pretty.HexByteString
Description
A ByteString newtype wrapper indicating a human-readable
bytestring, to be displayed in hex form (e.g. 00 12 AB FF).
Synopsis
- newtype HexByteString = HexByteString {
- unHexByteString :: Bytes
- parseHexByteString :: (MonadParsec e s m, Token s ~ Char) => m Bytes
- prettyHexByteString :: Bytes -> Text
Documentation
newtype HexByteString Source #
Constructors
| HexByteString | |
Fields
| |
Instances
| Eq HexByteString Source # | |
Defined in BytePatch.Pretty.HexByteString | |
| Show HexByteString Source # | |
Defined in BytePatch.Pretty.HexByteString Methods showsPrec :: Int -> HexByteString -> ShowS show :: HexByteString -> String showList :: [HexByteString] -> ShowS | |
| PatchRep HexByteString Source # | |
Defined in BytePatch.Pretty.HexByteString Methods toPatchRep :: HexByteString -> Either String ByteString Source # | |
| FromJSON HexByteString | |
Defined in BytePatch.JSON | |
| ToJSON HexByteString | |
Defined in BytePatch.JSON Methods toJSON :: HexByteString -> Value toEncoding :: HexByteString -> Encoding toJSONList :: [HexByteString] -> Value toEncodingList :: [HexByteString] -> Encoding | |
parseHexByteString :: (MonadParsec e s m, Token s ~ Char) => m Bytes Source #
A hex bytestring looks like this: 00 01 89 8a FEff. You can mix and
match capitalization and spacing, but I prefer to space each byte, full caps.
prettyHexByteString :: Bytes -> Text Source #