data-dword-0.3: Stick two binary words together to get a bigger one

Safe HaskellNone

Data.DoubleWord

Description

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.

Synopsis

Documentation

class BinaryWord w => DoubleWord w whereSource

Defines a particular way to split a binary word in halves.

Associated Types

type LoWord w Source

The low half type

type HiWord w Source

The high half type

Methods

loWord :: w -> LoWord wSource

The low half of the word

hiWord :: w -> HiWord wSource

The high half of the word

fromHiAndLo :: HiWord w -> LoWord w -> wSource

Construct a word from the low and high halves

extendLo :: LoWord w -> wSource

Extend the low half

signExtendLo :: SignedWord (LoWord w) -> wSource

Sign-extend the low half