bytepatch-0.2.1: Patch byte-representable data in a bytestream.
Safe HaskellNone
LanguageHaskell2010

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

Documentation

newtype HexByteString Source #

Constructors

HexByteString 

Fields

Instances

Instances details
Eq HexByteString Source # 
Instance details

Defined in BytePatch.Pretty.HexByteString

Show HexByteString Source # 
Instance details

Defined in BytePatch.Pretty.HexByteString

Methods

showsPrec :: Int -> HexByteString -> ShowS

show :: HexByteString -> String

showList :: [HexByteString] -> ShowS

PatchRep HexByteString Source # 
Instance details

Defined in BytePatch.Pretty.HexByteString

Methods

toPatchRep :: HexByteString -> Either String ByteString Source #

FromJSON HexByteString 
Instance details

Defined in BytePatch.JSON

Methods

parseJSON :: Value -> Parser HexByteString

parseJSONList :: Value -> Parser [HexByteString]

ToJSON HexByteString 
Instance details

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 #