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

Clash.Num.Zeroing

Synopsis

Documentation

data Zeroing a Source #

A zeroing number type is one where all operations return zero if they go out of bounds for the underlying type.

Numbers can be converted to zero by default using toZeroing.

Instances

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

Defined in Clash.Num.Zeroing

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

Defined in Clash.Num.Zeroing

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

Defined in Clash.Num.Zeroing

Methods

(==) :: Zeroing a -> Zeroing a -> Bool Source #

(/=) :: Zeroing a -> Zeroing a -> Bool Source #

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

Defined in Clash.Num.Zeroing

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

Defined in Clash.Num.Zeroing

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

Defined in Clash.Num.Zeroing

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

Defined in Clash.Num.Zeroing

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

Defined in Clash.Num.Zeroing

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

Defined in Clash.Num.Zeroing

Methods

properFraction :: Integral b => Zeroing a -> (b, Zeroing a) Source #

truncate :: Integral b => Zeroing a -> b Source #

round :: Integral b => Zeroing a -> b Source #

ceiling :: Integral b => Zeroing a -> b Source #

floor :: Integral b => Zeroing a -> b Source #

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

Defined in Clash.Num.Zeroing

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

Defined in Clash.Num.Zeroing

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

Defined in Clash.Num.Zeroing

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

Defined in Clash.Num.Zeroing

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

Defined in Clash.Num.Zeroing

Methods

put :: Zeroing a -> Put Source #

get :: Get (Zeroing a) Source #

putList :: [Zeroing a] -> Put Source #

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

Defined in Clash.Num.Zeroing

Methods

rnf :: Zeroing a -> () Source #

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

Defined in Clash.Num.Zeroing

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

Defined in Clash.Num.Zeroing

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

Defined in Clash.Num.Zeroing

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

Defined in Clash.Num.Zeroing

Associated Types

type BitSize (Zeroing a) :: Nat Source #

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

Defined in Clash.Num.Zeroing

Methods

even :: Zeroing a -> Bool Source #

odd :: Zeroing a -> Bool Source #

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

Defined in Clash.Num.Zeroing

Methods

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

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

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

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

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

type BitSize (Zeroing a) Source # 
Instance details

Defined in Clash.Num.Zeroing

type BitSize (Zeroing a) = BitSize a