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

Clash.Num.Erroring

Synopsis

Documentation

data Erroring a Source #

An erroring number type is one where all operations return a XExecption if they would go out of bounds for the underlying type.

Numbers can be converted to error by default using toErroring.

Instances

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

Defined in Clash.Num.Erroring

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

Defined in Clash.Num.Erroring

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

Defined in Clash.Num.Erroring

Methods

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

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

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

Defined in Clash.Num.Erroring

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

Defined in Clash.Num.Erroring

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

Defined in Clash.Num.Erroring

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

Defined in Clash.Num.Erroring

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

Defined in Clash.Num.Erroring

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

Defined in Clash.Num.Erroring

Methods

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

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

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

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

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

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

Defined in Clash.Num.Erroring

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

Defined in Clash.Num.Erroring

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

Defined in Clash.Num.Erroring

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

Defined in Clash.Num.Erroring

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

Defined in Clash.Num.Erroring

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

Defined in Clash.Num.Erroring

Methods

rnf :: Erroring a -> () Source #

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

Defined in Clash.Num.Erroring

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

Defined in Clash.Num.Erroring

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

Defined in Clash.Num.Erroring

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

Defined in Clash.Num.Erroring

Associated Types

type BitSize (Erroring a) :: Nat Source #

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

Defined in Clash.Num.Erroring

Methods

even :: Erroring a -> Bool Source #

odd :: Erroring a -> Bool Source #

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

Defined in Clash.Num.Erroring

Methods

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

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

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

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

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

type BitSize (Erroring a) Source # 
Instance details

Defined in Clash.Num.Erroring

type BitSize (Erroring a) = BitSize a