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

# Documentation

data Word128 #

128 bits Word

Constructors

Word128 !Word64 !Word64 |

#### Instances

Instances details

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

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

Add 2 Word128

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

Subtract 2 Word128

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

Multiplication

quot :: Word128 -> Word128 -> Word128 #

Division

rem :: Word128 -> Word128 -> Word128 #

Modulo

bitwiseAnd :: Word128 -> Word128 -> Word128 #

Bitwise and

bitwiseOr :: Word128 -> Word128 -> Word128 #

Bitwise or

bitwiseXor :: Word128 -> Word128 -> Word128 #

Bitwise xor

complement :: Word128 -> Word128 #

Bitwise complement

shiftL :: Word128 -> Int -> Word128 #

Bitwise Shift Left

shiftR :: Word128 -> Int -> Word128 #

Bitwise Shift Right

rotateL :: Word128 -> Int -> Word128 #

Bitwise rotate Left

rotateR :: Word128 -> Int -> Word128 #

Bitwise rotate Left

popCount :: Word128 -> Int #

Population count

fromNatural :: Natural -> Word128 #