bytestring-nums-0.3.5: Parse numeric literals from ByteStrings.

Safe Haskell | None

Data.ByteString.Nums.Careless.Hex

Synopsis

- class Num n => Hexable b n where
  - hex :: b -> n
- hexalize :: Num n => n -> Word8 -> n
- strict_hex :: Num a => ByteString -> a
- lazy_hex :: Num a => ByteString -> a

# Documentation

class Num n => Hexable b n where Source

Types that can be read from hexadecimal strings. Characters that are not hexadecimal digits are skipped over. One pleasant consequence of this is that a leading `0x` is simply ignored.

Methods

hex :: b -> nSource

Instances

Hexable ByteString Double |
Hexable ByteString Float |
Hexable ByteString Int |
Hexable ByteString Int8 |
Hexable ByteString Int16 |
Hexable ByteString Int32 |
Hexable ByteString Int64 |
Hexable ByteString Integer |
Hexable ByteString Rational |
Hexable ByteString Word |
Hexable ByteString Word8 |
Hexable ByteString Word16 |
Hexable ByteString Word32 |
Hexable ByteString Word64 |
Hexable ByteString Double |
Hexable ByteString Float |
Hexable ByteString Int |
Hexable ByteString Int8 |
Hexable ByteString Int16 |
Hexable ByteString Int32 |
Hexable ByteString Int64 |
Hexable ByteString Integer |
Hexable ByteString Rational |
Hexable ByteString Word |
Hexable ByteString Word8 |
Hexable ByteString Word16 |
Hexable ByteString Word32 |
Hexable ByteString Word64 |

hexalize :: Num n => n -> Word8 -> nSource

strict_hex :: Num a => ByteString -> aSource

lazy_hex :: Num a => ByteString -> aSource