basement-0.0.4: Foundation scrap box of array & string

Safe Haskell | None
Language | Haskell2010

Basement.Numerical.Number

Synopsis

- class (Enum a, Eq a, Ord a, Integral a) => IsIntegral a where
- class (Enum a, Eq a, Ord a, Integral a, IsIntegral a) => IsNatural a where

# Documentation

class (Enum a, Eq a, Ord a, Integral a) => IsIntegral a where Source #

Number literals, convertible through the generic Integer type.

all number are Enum'erable, meaning that you can move to next element

Minimal complete definition

toInteger

Methods

toInteger :: a -> Integer Source #

Instances

IsIntegral Int Source # |
Methods toInteger :: Int -> Integer Source #
IsIntegral Int8 Source # |
Methods toInteger :: Int8 -> Integer Source #
IsIntegral Int16 Source # |
Methods toInteger :: Int16 -> Integer Source #
IsIntegral Int32 Source # |
Methods toInteger :: Int32 -> Integer Source #
IsIntegral Int64 Source # |
Methods toInteger :: Int64 -> Integer Source #
IsIntegral Integer Source # |
Methods toInteger :: Integer -> Integer Source #
IsIntegral Word Source # |
Methods toInteger :: Word -> Integer Source #
IsIntegral Word8 Source # |
Methods toInteger :: Word8 -> Integer Source #
IsIntegral Word16 Source # |
Methods toInteger :: Word16 -> Integer Source #
IsIntegral Word32 Source # |
Methods toInteger :: Word32 -> Integer Source #
IsIntegral Word64 Source # |
Methods toInteger :: Word64 -> Integer Source #
IsIntegral Natural Source # |
Methods toInteger :: Natural -> Integer Source #
IsIntegral CSize Source # |
Methods toInteger :: CSize -> Integer Source #
IsIntegral Word128 Source # |
Methods toInteger :: Word128 -> Integer Source #
IsIntegral Word256 Source # |
Methods toInteger :: Word256 -> Integer Source #
IsIntegral (CountOf ty) Source # |
Methods toInteger :: CountOf ty -> Integer Source #
IsIntegral (Offset ty) Source # |
Methods toInteger :: Offset ty -> Integer Source #

class (Enum a, Eq a, Ord a, Integral a, IsIntegral a) => IsNatural a where Source #

Non Negative Number literals, convertible through the generic Natural type

Minimal complete definition

toNatural

Methods

toNatural :: a -> Natural Source #

Instances

IsNatural Word Source # |
Methods toNatural :: Word -> Natural Source #
IsNatural Word8 Source # |
Methods toNatural :: Word8 -> Natural Source #
IsNatural Word16 Source # |
Methods toNatural :: Word16 -> Natural Source #
IsNatural Word32 Source # |
Methods toNatural :: Word32 -> Natural Source #
IsNatural Word64 Source # |
Methods toNatural :: Word64 -> Natural Source #
IsNatural Natural Source # |
Methods toNatural :: Natural -> Natural Source #
IsNatural CSize Source # |
Methods toNatural :: CSize -> Natural Source #
IsNatural Word128 Source # |
Methods toNatural :: Word128 -> Natural Source #
IsNatural Word256 Source # |
Methods toNatural :: Word256 -> Natural Source #
IsNatural (CountOf ty) Source # |
Methods toNatural :: CountOf ty -> Natural Source #
IsNatural (Offset ty) Source # |
Methods toNatural :: Offset ty -> Natural Source #