Basement.Types.Word256

basement-0.0.16: 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 #

256 bits Word

Constructors

Word256 !Word64 !Word64 !Word64 !Word64 |

#### Instances

Instances details

BitOps Word256 # |
Instance details Defined in Basement.Bits Methods (.&.) :: Word256 -> Word256 -> Word256 # (.|.) :: Word256 -> Word256 -> Word256 # (.^.) :: Word256 -> Word256 -> Word256 # (.<<.) :: Word256 -> CountOf Bool -> Word256 # (.>>.) :: Word256 -> CountOf Bool -> Word256 # bit :: Offset Bool -> Word256 # isBitSet :: Word256 -> Offset Bool -> Bool # setBit :: Word256 -> Offset Bool -> Word256 # clearBit :: Word256 -> Offset Bool -> Word256 #
FiniteBitsOps Word256 # |
Instance details Defined in Basement.Bits Methods numberOfBits :: Word256 -> CountOf Bool # rotateL :: Word256 -> CountOf Bool -> Word256 # rotateR :: Word256 -> CountOf Bool -> Word256 # popCount :: Word256 -> CountOf Bool # bitFlip :: Word256 -> Word256 # countLeadingZeros :: Word256 -> CountOf Bool # countTrailingZeros :: Word256 -> CountOf Bool #
HasNegation Word256 # |
Instance details Defined in Basement.Types.Word256 Methods negate :: Word256 -> Word256 #
Integral Word256 # |
Instance details Defined in Basement.Types.Word256 Methods fromInteger :: Integer -> Word256 #
NormalForm Word256 # |
Instance details Defined in Basement.NormalForm Methods toNormalForm :: Word256 -> () #
Additive Word256 # |
Instance details Defined in Basement.Numerical.Additive Methods azero :: Word256 # (+) :: Word256 -> Word256 -> Word256 # scale :: IsNatural n => n -> Word256 -> Word256 #
IDivisible Word256 # |
Instance details Defined in Basement.Numerical.Multiplicative Methods div :: Word256 -> Word256 -> Word256 # mod :: Word256 -> Word256 -> Word256 # divMod :: Word256 -> Word256 -> (Word256, Word256) #
Multiplicative Word256 # |
Instance details Defined in Basement.Numerical.Multiplicative Methods midentity :: Word256 # (*) :: Word256 -> Word256 -> Word256 # (^) :: (IsNatural n, Enum n, IDivisible n) => Word256 -> n -> Word256 #
IsIntegral Word256 # |
Instance details Defined in Basement.Types.Word256 Methods toInteger :: Word256 -> Integer #
IsNatural Word256 # |
Instance details Defined in Basement.Types.Word256 Methods toNatural :: Word256 -> Natural #
Subtractive Word256 # |
Instance details Defined in Basement.Numerical.Subtractive Associated Types
type Difference Word256 |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word256 = Word256
Methods (-) :: Word256 -> Word256 -> Difference Word256 #
PrimMemoryComparable Word256 # |
Instance details Defined in Basement.PrimType
PrimType Word256 # |
Instance details Defined in Basement.PrimType Associated Types
type PrimSize Word256 |
Instance details Defined in Basement.PrimType type PrimSize Word256 = 32
Methods primSizeInBytes :: Proxy Word256 -> CountOf Word8 # primShiftToBytes :: Proxy Word256 -> Int # primBaUIndex :: ByteArray# -> Offset Word256 -> Word256 # primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word256 -> prim Word256 # primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word256 -> Word256 -> prim () # primAddrIndex :: Addr# -> Offset Word256 -> Word256 # primAddrRead :: PrimMonad prim => Addr# -> Offset Word256 -> prim Word256 # primAddrWrite :: PrimMonad prim => Addr# -> Offset Word256 -> Word256 -> prim () #
Bits Word256 # |
Instance details Defined in Basement.Types.Word256 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 #
Bounded Word256 # |
Instance details Defined in Basement.Types.Word256 Methods minBound :: Word256 # maxBound :: Word256 #
Enum Word256 # |
Instance details Defined in Basement.Types.Word256 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] #
Storable Word256 # |
Instance details Defined in Basement.Types.Word256 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 () #
Num Word256 # |
Instance details Defined in Basement.Types.Word256 Methods (+) :: Word256 -> Word256 -> Word256 # (-) :: Word256 -> Word256 -> Word256 # (*) :: Word256 -> Word256 -> Word256 # negate :: Word256 -> Word256 # abs :: Word256 -> Word256 # signum :: Word256 -> Word256 # fromInteger :: Integer -> Word256 #
Show Word256 # |
Instance details Defined in Basement.Types.Word256 Methods showsPrec :: Int -> Word256 -> ShowS # show :: Word256 -> String # showList :: [Word256] -> ShowS #
Eq Word256 # |
Instance details Defined in Basement.Types.Word256 Methods (==) :: Word256 -> Word256 -> Bool # (/=) :: Word256 -> Word256 -> Bool #
Ord Word256 # |
Instance details Defined in Basement.Types.Word256 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 #
From Word128 Word256 # |
Instance details Defined in Basement.From Methods from :: Word128 -> Word256 #
From Word16 Word256 # |
Instance details Defined in Basement.From Methods from :: Word16 -> Word256 #
From Word32 Word256 # |
Instance details Defined in Basement.From Methods from :: Word32 -> Word256 #
From Word64 Word256 # |
Instance details Defined in Basement.From Methods from :: Word64 -> Word256 #
From Word8 Word256 # |
Instance details Defined in Basement.From Methods from :: Word8 -> Word256 #
(KnownNat n, NatWithinBound Word256 n) => From (Zn n) Word256 # |
Instance details Defined in Basement.From Methods from :: Zn n -> Word256 #
From (Zn64 n) Word256 # |
Instance details Defined in Basement.From Methods from :: Zn64 n -> Word256 #
type NatNumMaxBound Word256 # |
Instance details Defined in Basement.Nat type NatNumMaxBound Word256 = 115792089237316195423570985008687907853269984665640564039457584007913129639935
type Difference Word256 # |
Instance details Defined in Basement.Numerical.Subtractive type Difference Word256 = Word256
type PrimSize Word256 # |
Instance details Defined in Basement.PrimType type PrimSize Word256 = 32

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

Add 2 Word256

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

Subtract 2 Word256

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

Multiplication

quot :: Word256 -> Word256 -> Word256 #

Division

rem :: Word256 -> Word256 -> Word256 #

Modulo

bitwiseAnd :: Word256 -> Word256 -> Word256 #

Bitwise and

bitwiseOr :: Word256 -> Word256 -> Word256 #

Bitwise or

bitwiseXor :: Word256 -> Word256 -> Word256 #

Bitwise xor

complement :: Word256 -> Word256 #

Bitwise complement

shiftL :: Word256 -> Int -> Word256 #

Bitwise Shift Left

shiftR :: Word256 -> Int -> Word256 #

Bitwise Shift Right

rotateL :: Word256 -> Int -> Word256 #

Bitwise rotate Left

rotateR :: Word256 -> Int -> Word256 #

Bitwise rotate Left

popCount :: Word256 -> Int #

Population count

fromNatural :: Natural -> Word256 #