Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class IntegralDownsize a b where
- integralDownsize :: a -> b
- integralDownsizeCheck :: a -> Maybe b
- class IntegralUpsize a b where
- integralUpsize :: a -> b
- intToInt64 :: Int -> Int64
- int64ToInt :: Int64 -> Int
- wordToWord64 :: Word -> Word64
- word64ToWord32s :: Word64 -> Word32x2
- data Word32x2 = Word32x2 !Word32 !Word32
- word64ToWord :: Word64 -> Word
- wordToChar :: Word -> Char
- wordToInt :: Word -> Int
- charToInt :: Char -> Int
Documentation
class IntegralDownsize a b where Source #
Downsize an integral value
integralDownsize :: a -> b Source #
default integralDownsize :: a ~ b => a -> b Source #
integralDownsizeCheck :: a -> Maybe b Source #
Instances
class IntegralUpsize a b where Source #
Upsize an integral value
The destination type b
size need to be greater or equal
than the size type of a
integralUpsize :: a -> b Source #
Instances
intToInt64 :: Int -> Int64 Source #
int64ToInt :: Int64 -> Int Source #
wordToWord64 :: Word -> Word64 Source #
word64ToWord32s :: Word64 -> Word32x2 Source #
word64ToWord :: Word64 -> Word Source #
wordToChar :: Word -> Char Source #