Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides strict (low and high halves are unpacked) signed and unsigned binary word data types of sizes 96, 128, 160, 192, 224, and 256 bits.
- module Data.BinaryWord
- class BinaryWord w => DoubleWord w where
- data Word96 = Word96 !Word32 !Word64
- data Word128 = Word128 !Word64 !Word64
- data Word160 = Word160 !Word32 !Word128
- data Word192 = Word192 !Word64 !Word128
- data Word224 = Word224 !Word96 !Word128
- data Word256 = Word256 !Word128 !Word128
- data Int96 = Int96 !Int32 !Word64
- data Int128 = Int128 !Int64 !Word64
- data Int160 = Int160 !Int32 !Word128
- data Int192 = Int192 !Int64 !Word128
- data Int224 = Int224 !Int96 !Word128
- data Int256 = Int256 !Int128 !Word128
Documentation
module Data.BinaryWord
class BinaryWord w => DoubleWord w where Source #
Defines a particular way to split a binary word in halves.
loWord :: w -> LoWord w Source #
The low half of the word
hiWord :: w -> HiWord w Source #
The high half of the word
fromHiAndLo :: HiWord w -> LoWord w -> w Source #
Construct a word from the low and high halves
extendLo :: LoWord w -> w Source #
Extend the low half
signExtendLo :: SignedWord (LoWord w) -> w Source #
Sign-extend the low half