Data.ByteString.Nums.Careless.Hex

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

Data.ByteString.Nums.Careless.Hex

Synopsis

- class Num n => Hexable b n where
  - hex :: b -> n
- hexalize :: Num n => n -> Word8 -> n

# Documentation

class Num n => Hexable b n where

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 -> n

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 -> n