basement-0.0.2: Foundation scrap box of array & string

Safe HaskellNone
LanguageHaskell2010

Basement.IntegralConv

Synopsis

Documentation

class IntegralDownsize a b where #

Downsize an integral value

Minimal complete definition

integralDownsizeCheck

Methods

integralDownsize :: a -> b #

integralDownsize :: a ~ b => a -> b #

integralDownsizeCheck :: a -> Maybe b #

Instances

IntegralDownsize Int Int8 # 
IntegralDownsize Int Int16 # 
IntegralDownsize Int Int32 # 
IntegralDownsize Int64 Int # 
IntegralDownsize Int64 Int8 # 
IntegralDownsize Int64 Int16 # 
IntegralDownsize Int64 Int32 # 
IntegralDownsize Integer Int8 # 
IntegralDownsize Integer Int16 # 
IntegralDownsize Integer Int32 # 
IntegralDownsize Integer Int64 # 
IntegralDownsize Integer Word8 # 
IntegralDownsize Integer Word16 # 
IntegralDownsize Integer Word32 # 
IntegralDownsize Integer Word64 # 
IntegralDownsize Integer Natural # 
IntegralDownsize Word Word8 # 
IntegralDownsize Word Word16 # 
IntegralDownsize Word Word32 # 
IntegralDownsize Word16 Word8 # 
IntegralDownsize Word32 Word8 # 
IntegralDownsize Word32 Word16 # 
IntegralDownsize Word64 Word8 # 
IntegralDownsize Word64 Word16 # 
IntegralDownsize Word64 Word32 # 
IntegralDownsize Natural Word8 # 
IntegralDownsize Natural Word16 # 
IntegralDownsize Natural Word32 # 
IntegralDownsize Natural Word64 # 

class IntegralUpsize a b where #

Upsize an integral value

The destination type b size need to be greater or equal than the size type of a

Minimal complete definition

integralUpsize

Methods

integralUpsize :: a -> b #

Instances

IntegralUpsize Int Int64 # 

Methods

integralUpsize :: Int -> Int64 #

IntegralUpsize Int8 Int # 

Methods

integralUpsize :: Int8 -> Int #

IntegralUpsize Int8 Int16 # 

Methods

integralUpsize :: Int8 -> Int16 #

IntegralUpsize Int8 Int32 # 

Methods

integralUpsize :: Int8 -> Int32 #

IntegralUpsize Int8 Int64 # 

Methods

integralUpsize :: Int8 -> Int64 #

IntegralUpsize Int16 Int # 

Methods

integralUpsize :: Int16 -> Int #

IntegralUpsize Int16 Int32 # 
IntegralUpsize Int16 Int64 # 
IntegralUpsize Int32 Int # 

Methods

integralUpsize :: Int32 -> Int #

IntegralUpsize Int32 Int64 # 
IntegralUpsize Word Word64 # 
IntegralUpsize Word8 Int # 

Methods

integralUpsize :: Word8 -> Int #

IntegralUpsize Word8 Int16 # 
IntegralUpsize Word8 Int32 # 
IntegralUpsize Word8 Int64 # 
IntegralUpsize Word8 Word # 

Methods

integralUpsize :: Word8 -> Word #

IntegralUpsize Word8 Word16 # 
IntegralUpsize Word8 Word32 # 
IntegralUpsize Word8 Word64 # 
IntegralUpsize Word16 Word # 
IntegralUpsize Word16 Word32 # 
IntegralUpsize Word16 Word64 # 
IntegralUpsize Word32 Word # 
IntegralUpsize Word32 Word64 # 
IsNatural a => IntegralUpsize a Natural # 

Methods

integralUpsize :: a -> Natural #

IsIntegral a => IntegralUpsize a Integer # 

Methods

integralUpsize :: a -> Integer #

class IntegralCast a b where #

Cast an integral value to another value that have the same representional size

Methods

integralCast :: a -> b #

integralCast :: a ~ b => a -> b #

data Word32x2 #

2 Word32s

Constructors

Word32x2 !Word32 !Word32