basement-0.0.4: Foundation scrap box of array & string

Safe Haskell | None
Language | Haskell2010

Basement.Types.Word256

Synopsis

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

# Documentation

data Word256 Source #

256 bits Word

Constructors

Word256 !Word64 !Word64 !Word64 !Word64 |

Instances

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

Methods

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

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

xor :: Word256 -> Word256 -> Word256 #

complement :: Word256 -> Word256 #

shift :: Word256 -> Int -> Word256 #

rotate :: Word256 -> Int -> Word256 #

zeroBits :: Word256 #

bit :: Int -> Word256 #

setBit :: Word256 -> Int -> Word256 #

clearBit :: Word256 -> Int -> Word256 #

complementBit :: Word256 -> Int -> Word256 #

testBit :: Word256 -> Int -> Bool #

bitSizeMaybe :: Word256 -> Maybe Int #

bitSize :: Word256 -> Int #

isSigned :: Word256 -> Bool #

shiftL :: Word256 -> Int -> Word256 #

unsafeShiftL :: Word256 -> Int -> Word256 #

shiftR :: Word256 -> Int -> Word256 #

unsafeShiftR :: Word256 -> Int -> Word256 #

rotateL :: Word256 -> Int -> Word256 #

rotateR :: Word256 -> Int -> Word256 #

popCount :: Word256 -> Int #

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

Methods

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

primShiftToBytes :: Proxy * Word256 -> Int Source #

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

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

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

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

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

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

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

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

Add 2 Word256

(-) :: Word256 -> Word256 -> Word256 Source #

Subtract 2 Word256

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

Multiplication

quot :: Word256 -> Word256 -> Word256 Source #

Division

rem :: Word256 -> Word256 -> Word256 Source #

Modulo

bitwiseAnd :: Word256 -> Word256 -> Word256 Source #

Bitwise and

bitwiseOr :: Word256 -> Word256 -> Word256 Source #

Bitwise or

bitwiseXor :: Word256 -> Word256 -> Word256 Source #

Bitwise xor

fromNatural :: Natural -> Word256 Source #