basement-0.0.4: Foundation scrap box of array & string

Safe Haskell | None
Language | Haskell2010

Basement.Types.Word128

Synopsis

- data Word128 = Word128 !Word64 !Word64
- (+) :: Word128 -> Word128 -> Word128
- (-) :: Word128 -> Word128 -> Word128
- (*) :: Word128 -> Word128 -> Word128
- quot :: Word128 -> Word128 -> Word128
- rem :: Word128 -> Word128 -> Word128
- bitwiseAnd :: Word128 -> Word128 -> Word128
- bitwiseOr :: Word128 -> Word128 -> Word128
- bitwiseXor :: Word128 -> Word128 -> Word128
- fromNatural :: Natural -> Word128

# Documentation

data Word128 Source #

128 bits Word

Constructors

Word128 !Word64 !Word64 |

Instances

Bounded Word128 Source # |
Methods minBound :: Word128 # maxBound :: Word128 #
Enum Word128 Source # |
Methods succ :: Word128 -> Word128 # pred :: Word128 -> Word128 # toEnum :: Int -> Word128 # fromEnum :: Word128 -> Int # enumFrom :: Word128 -> [Word128] # enumFromThen :: Word128 -> Word128 -> [Word128] # enumFromTo :: Word128 -> Word128 -> [Word128] # enumFromThenTo :: Word128 -> Word128 -> Word128 -> [Word128] #
Eq Word128 Source # |
Methods (==) :: Word128 -> Word128 -> Bool # (/=) :: Word128 -> Word128 -> Bool #
Num Word128 Source # |
Methods (+) :: Word128 -> Word128 -> Word128 # (-) :: Word128 -> Word128 -> Word128 # (*) :: Word128 -> Word128 -> Word128 # negate :: Word128 -> Word128 # abs :: Word128 -> Word128 # signum :: Word128 -> Word128 # fromInteger :: Integer -> Word128 #
Ord Word128 Source # |
Methods compare :: Word128 -> Word128 -> Ordering # (<) :: Word128 -> Word128 -> Bool # (<=) :: Word128 -> Word128 -> Bool # (>) :: Word128 -> Word128 -> Bool # (>=) :: Word128 -> Word128 -> Bool # max :: Word128 -> Word128 -> Word128 # min :: Word128 -> Word128 -> Word128 #
Show Word128 Source # |
Methods showsPrec :: Int -> Word128 -> ShowS # show :: Word128 -> String # showList :: [Word128] -> ShowS #
Storable Word128 Source # |
Methods sizeOf :: Word128 -> Int # alignment :: Word128 -> Int # peekElemOff :: Ptr Word128 -> Int -> IO Word128 # pokeElemOff :: Ptr Word128 -> Int -> Word128 -> IO () # peekByteOff :: Ptr b -> Int -> IO Word128 # pokeByteOff :: Ptr b -> Int -> Word128 -> IO () # peek :: Ptr Word128 -> IO Word128 # poke :: Ptr Word128 -> Word128 -> IO () #
Bits Word128 Source # |

Methods

(.&.) :: Word128 -> Word128 -> Word128 #

(.|.) :: Word128 -> Word128 -> Word128 #

xor :: Word128 -> Word128 -> Word128 #

complement :: Word128 -> Word128 #

shift :: Word128 -> Int -> Word128 #

rotate :: Word128 -> Int -> Word128 #

zeroBits :: Word128 #

bit :: Int -> Word128 #

setBit :: Word128 -> Int -> Word128 #

clearBit :: Word128 -> Int -> Word128 #

complementBit :: Word128 -> Int -> Word128 #

testBit :: Word128 -> Int -> Bool #

bitSizeMaybe :: Word128 -> Maybe Int #

bitSize :: Word128 -> Int #

isSigned :: Word128 -> Bool #

shiftL :: Word128 -> Int -> Word128 #

unsafeShiftL :: Word128 -> Int -> Word128 #

shiftR :: Word128 -> Int -> Word128 #

unsafeShiftR :: Word128 -> Int -> Word128 #

rotateL :: Word128 -> Int -> Word128 #

rotateR :: Word128 -> Int -> Word128 #

popCount :: Word128 -> Int #

HasNegation Word128 Source # |
Methods negate :: Word128 -> Word128 Source #
Integral Word128 Source # |
Methods fromInteger :: Integer -> Word128 Source #
IsNatural Word128 Source # |
Methods toNatural :: Word128 -> Natural Source #
IsIntegral Word128 Source # |
Methods toInteger :: Word128 -> Integer Source #
Additive Word128 Source # |
Methods azero :: Word128 Source # (+) :: Word128 -> Word128 -> Word128 Source # scale :: IsNatural n => n -> Word128 -> Word128 Source #
IDivisible Word128 Source # |
Methods div :: Word128 -> Word128 -> Word128 Source # mod :: Word128 -> Word128 -> Word128 Source # divMod :: Word128 -> Word128 -> (Word128, Word128) Source #
Multiplicative Word128 Source # |
Methods midentity :: Word128 Source # (*) :: Word128 -> Word128 -> Word128 Source # (^) :: (IsNatural n, IDivisible n) => Word128 -> n -> Word128 Source #
Subtractive Word128 Source # |
Associated Types type Difference Word128 :: * Source # Methods (-) :: Word128 -> Word128 -> Difference Word128 Source #
NormalForm Word128 Source # |
Methods toNormalForm :: Word128 -> () Source #
PrimMemoryComparable Word128 Source # |
PrimType Word128 Source # |

Methods

primSizeInBytes :: Proxy * Word128 -> CountOf Word8 Source #

primShiftToBytes :: Proxy * Word128 -> Int Source #

primBaUIndex :: ByteArray# -> Offset Word128 -> Word128 Source #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word128 -> prim Word128 Source #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word128 -> Word128 -> prim () Source #

primAddrIndex :: Addr# -> Offset Word128 -> Word128 Source #

primAddrRead :: PrimMonad prim => Addr# -> Offset Word128 -> prim Word128 Source #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Word128 -> Word128 -> prim () Source #

From Word8 Word128 Source # |
Methods from :: Word8 -> Word128 Source #
From Word16 Word128 Source # |
Methods from :: Word16 -> Word128 Source #
From Word32 Word128 Source # |
Methods from :: Word32 -> Word128 Source #
From Word64 Word128 Source # |
Methods from :: Word64 -> Word128 Source #
(KnownNat n, NatWithinBound Word128 n) => From (Zn n) Word128 Source # |
Methods from :: Zn n -> Word128 Source #
From (Zn64 n) Word128 Source # |
Methods from :: Zn64 n -> Word128 Source #
type NatNumMaxBound Word128 Source # |
type NatNumMaxBound Word128 = 340282366920938463463374607431768211455
type Difference Word128 Source # |
type Difference Word128 = Word128

(+) :: Word128 -> Word128 -> Word128 Source #

Add 2 Word128

(-) :: Word128 -> Word128 -> Word128 Source #

Subtract 2 Word128

(*) :: Word128 -> Word128 -> Word128 Source #

Multiplication

quot :: Word128 -> Word128 -> Word128 Source #

Division

rem :: Word128 -> Word128 -> Word128 Source #

Modulo

bitwiseAnd :: Word128 -> Word128 -> Word128 Source #

Bitwise and

bitwiseOr :: Word128 -> Word128 -> Word128 Source #

Bitwise or

bitwiseXor :: Word128 -> Word128 -> Word128 Source #

Bitwise xor

fromNatural :: Natural -> Word128 Source #