basement-0.0.11: 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
- complement :: Word256 -> Word256
- shiftL :: Word256 -> Int -> Word256
- shiftR :: Word256 -> Int -> Word256
- rotateL :: Word256 -> Int -> Word256
- rotateR :: Word256 -> Int -> Word256
- popCount :: Word256 -> Int
- fromNatural :: Natural -> Word256

# Documentation

data Word256 Source #

256 bits Word

Constructors

Word256 !Word64 !Word64 !Word64 !Word64 |

#### Instances

Instances details

Bounded Word256 Source # |
Instance details Defined in Basement.Types.Word256 Methods minBound :: Word256 Source # maxBound :: Word256 Source #
Enum Word256 Source # |

Instance details

Defined in Basement.Types.Word256

Methods

succ :: Word256 -> Word256 Source #

pred :: Word256 -> Word256 Source #

toEnum :: Int -> Word256 Source #

fromEnum :: Word256 -> Int Source #

enumFrom :: Word256 -> [Word256] Source #

enumFromThen :: Word256 -> Word256 -> [Word256] Source #

enumFromTo :: Word256 -> Word256 -> [Word256] Source #

enumFromThenTo :: Word256 -> Word256 -> Word256 -> [Word256] Source #

Eq Word256 Source # |
Instance details Defined in Basement.Types.Word256 Methods (==) :: Word256 -> Word256 -> Bool Source # (/=) :: Word256 -> Word256 -> Bool Source #
Num Word256 Source # |
Instance details Defined in Basement.Types.Word256 Methods (+) :: Word256 -> Word256 -> Word256 Source # (-) :: Word256 -> Word256 -> Word256 Source # (*) :: Word256 -> Word256 -> Word256 Source # negate :: Word256 -> Word256 Source # abs :: Word256 -> Word256 Source # signum :: Word256 -> Word256 Source # fromInteger :: Integer -> Word256 Source #
Ord Word256 Source # |
Instance details Defined in Basement.Types.Word256 Methods compare :: Word256 -> Word256 -> Ordering Source # (<) :: Word256 -> Word256 -> Bool Source # (<=) :: Word256 -> Word256 -> Bool Source # (>) :: Word256 -> Word256 -> Bool Source # (>=) :: Word256 -> Word256 -> Bool Source # max :: Word256 -> Word256 -> Word256 Source # min :: Word256 -> Word256 -> Word256 Source #
Show Word256 Source # |
Instance details Defined in Basement.Types.Word256 Methods showsPrec :: Int -> Word256 -> ShowS Source # show :: Word256 -> String Source # showList :: [Word256] -> ShowS Source #
Storable Word256 Source # |

Instance details

Defined in Basement.Types.Word256

Methods

sizeOf :: Word256 -> Int Source #

alignment :: Word256 -> Int Source #

peekElemOff :: Ptr Word256 -> Int -> IO Word256 Source #

pokeElemOff :: Ptr Word256 -> Int -> Word256 -> IO () Source #

peekByteOff :: Ptr b -> Int -> IO Word256 Source #

pokeByteOff :: Ptr b -> Int -> Word256 -> IO () Source #

peek :: Ptr Word256 -> IO Word256 Source #

poke :: Ptr Word256 -> Word256 -> IO () Source #

Bits Word256 Source # |

Instance details

Defined in Basement.Types.Word256

Methods

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

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

xor :: Word256 -> Word256 -> Word256 Source #

complement :: Word256 -> Word256 Source #

shift :: Word256 -> Int -> Word256 Source #

rotate :: Word256 -> Int -> Word256 Source #

zeroBits :: Word256 Source #

bit :: Int -> Word256 Source #

setBit :: Word256 -> Int -> Word256 Source #

clearBit :: Word256 -> Int -> Word256 Source #

complementBit :: Word256 -> Int -> Word256 Source #

testBit :: Word256 -> Int -> Bool Source #

bitSizeMaybe :: Word256 -> Maybe Int Source #

bitSize :: Word256 -> Int Source #

isSigned :: Word256 -> Bool Source #

shiftL :: Word256 -> Int -> Word256 Source #

unsafeShiftL :: Word256 -> Int -> Word256 Source #

shiftR :: Word256 -> Int -> Word256 Source #

unsafeShiftR :: Word256 -> Int -> Word256 Source #

rotateL :: Word256 -> Int -> Word256 Source #

rotateR :: Word256 -> Int -> Word256 Source #

popCount :: Word256 -> Int Source #

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

Instance details

Defined in Basement.PrimType

Associated Types

type PrimSize Word256 :: Nat 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 #

NormalForm Word256 Source # |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word256 -> () Source #
BitOps Word256 Source # |

Instance details

Defined in Basement.Bits

Methods

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

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

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

(.<<.) :: Word256 -> CountOf Bool -> Word256 Source #

(.>>.) :: Word256 -> CountOf Bool -> Word256 Source #

bit :: Offset Bool -> Word256 Source #

isBitSet :: Word256 -> Offset Bool -> Bool Source #

setBit :: Word256 -> Offset Bool -> Word256 Source #

clearBit :: Word256 -> Offset Bool -> Word256 Source #

FiniteBitsOps Word256 Source # |

Instance details

Defined in Basement.Bits

Methods

numberOfBits :: Word256 -> CountOf Bool Source #

rotateL :: Word256 -> CountOf Bool -> Word256 Source #

rotateR :: Word256 -> CountOf Bool -> Word256 Source #

popCount :: Word256 -> CountOf Bool Source #

bitFlip :: Word256 -> Word256 Source #

countLeadingZeros :: Word256 -> CountOf Bool Source #

countTrailingZeros :: Word256 -> CountOf Bool Source #

From Word8 Word256 Source # |
Instance details Defined in Basement.From Methods from :: Word8 -> Word256 Source #
From Word16 Word256 Source # |
Instance details Defined in Basement.From Methods from :: Word16 -> Word256 Source #
From Word32 Word256 Source # |
Instance details Defined in Basement.From Methods from :: Word32 -> Word256 Source #
From Word64 Word256 Source # |
Instance details Defined in Basement.From Methods from :: Word64 -> Word256 Source #
From Word128 Word256 Source # |
Instance details Defined in Basement.From Methods from :: Word128 -> Word256 Source #
(KnownNat n, NatWithinBound Word256 n) => From (Zn n) Word256 Source # |
Instance details Defined in Basement.From Methods from :: Zn n -> Word256 Source #
From (Zn64 n) Word256 Source # |
Instance details Defined in Basement.From Methods from :: Zn64 n -> Word256 Source #
type NatNumMaxBound Word256 Source # |
Instance details Defined in Basement.Nat type NatNumMaxBound Word256 = 115792089237316195423570985008687907853269984665640564039457584007913129639935
type Difference Word256 Source # |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word256 = Word256
type PrimSize Word256 Source # |
Instance details Defined in Basement.PrimType type PrimSize Word256 = 32

(+) :: 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

complement :: Word256 -> Word256 Source #

Bitwise complement

shiftL :: Word256 -> Int -> Word256 Source #

Bitwise Shift Left

shiftR :: Word256 -> Int -> Word256 Source #

Bitwise Shift Right

rotateL :: Word256 -> Int -> Word256 Source #

Bitwise rotate Left

rotateR :: Word256 -> Int -> Word256 Source #

Bitwise rotate Left

popCount :: Word256 -> Int Source #

Population count

fromNatural :: Natural -> Word256 Source #