Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 #
HexByteString | |
|
Instances
Eq HexByteString Source # | |
Defined in BytePatch.Pretty.HexByteString (==) :: HexByteString -> HexByteString -> Bool # (/=) :: HexByteString -> HexByteString -> Bool # | |
Show HexByteString Source # | |
Defined in BytePatch.Pretty.HexByteString showsPrec :: Int -> HexByteString -> ShowS # show :: HexByteString -> String # showList :: [HexByteString] -> ShowS # | |
ToJSON HexByteString Source # | |
Defined in BytePatch.JSON toJSON :: HexByteString -> Value # toEncoding :: HexByteString -> Encoding # toJSONList :: [HexByteString] -> Value # toEncodingList :: [HexByteString] -> Encoding # | |
FromJSON HexByteString Source # | |
Defined in BytePatch.JSON parseJSON :: Value -> Parser HexByteString # parseJSONList :: Value -> Parser [HexByteString] # | |
PatchRep HexByteString Source # | |
Defined in BytePatch.Pretty.HexByteString |
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 #