clash-prelude-1.9.0: Clash: a functional hardware description language - Prelude library
Safe HaskellNone
LanguageHaskell2010

Clash.Num.Saturating

Synopsis

Documentation

data Saturating a Source #

A saturating number type is one where all operations saturate at the bounds of the underlying type, i.e. operations which overflow return maxBound and operations that underflow return minBound.

Numbers can be converted to saturate by default using toSaturating.

Instances

Instances details
Bounded a => Bounded (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

(Enum a, SaturatingNum a) => Enum (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

Eq a => Eq (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

(Fractional a, Ord a, SaturatingNum a) => Fractional (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

(Integral a, SaturatingNum a) => Integral (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

(Ord a, SaturatingNum a) => Num (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

Ord a => Ord (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

(Real a, SaturatingNum a) => Real (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

(Ord a, RealFrac a, SaturatingNum a) => RealFrac (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

Show a => Show (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

Arbitrary a => Arbitrary (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

Bits a => Bits (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

FiniteBits a => FiniteBits (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

Binary a => Binary (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

NFData a => NFData (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

Methods

rnf :: Saturating a -> () Source #

Hashable a => Hashable (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

NFDataX a => NFDataX (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

ShowX a => ShowX (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

BitPack a => BitPack (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

Associated Types

type BitSize (Saturating a) :: Nat Source #

Parity a => Parity (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating

Resize f => Resize (Compose Saturating f) Source # 
Instance details

Defined in Clash.Num.Saturating

Methods

resize :: forall (a :: Nat) (b :: Nat). (KnownNat a, KnownNat b) => Compose Saturating f a -> Compose Saturating f b Source #

extend :: forall (a :: Nat) (b :: Nat). (KnownNat a, KnownNat b) => Compose Saturating f a -> Compose Saturating f (b + a) Source #

zeroExtend :: forall (a :: Nat) (b :: Nat). (KnownNat a, KnownNat b) => Compose Saturating f a -> Compose Saturating f (b + a) Source #

signExtend :: forall (a :: Nat) (b :: Nat). (KnownNat a, KnownNat b) => Compose Saturating f a -> Compose Saturating f (b + a) Source #

truncateB :: forall (a :: Nat) (b :: Nat). KnownNat a => Compose Saturating f (a + b) -> Compose Saturating f a Source #

type BitSize (Saturating a) Source # 
Instance details

Defined in Clash.Num.Saturating