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

Safe Haskell | None

Data.ByteString.Nums.Careless.Int

Synopsis

- class Num n => Intable b n where
  - int :: b -> n
- lazy_unsigned :: Num n => ByteString -> n
- lazy_signed :: Num a => ByteString -> a
- strict_unsigned :: Num n => ByteString -> n
- strict_signed :: Num a => ByteString -> a
- positive :: Num a => a -> Word8 -> a
- negative :: Num a => a -> Word8 -> a

# Documentation

class Num n => Intable b n where Source

Types that can be read from integer strings. Parses only decimal digits. Signed types can be read from strings that begin with a plus or minus; unsigned types are read from strings consisting solely of decimal digits.

Methods

int :: b -> nSource

Instances

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

lazy_unsigned :: Num n => ByteString -> nSource

lazy_signed :: Num a => ByteString -> aSource

strict_unsigned :: Num n => ByteString -> nSource

strict_signed :: Num a => ByteString -> aSource

positive :: Num a => a -> Word8 -> aSource

negative :: Num a => a -> Word8 -> aSource