clash-prelude-1.6.6: 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 #

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

(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

Methods

compare :: Erroring a -> Erroring a -> Ordering #

(<) :: Erroring a -> Erroring a -> Bool #

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

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

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

max :: Erroring a -> Erroring a -> Erroring a #

min :: Erroring a -> Erroring a -> Erroring a #

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

Defined in Clash.Num.Erroring

Methods

toRational :: Erroring a -> Rational #

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

Defined in Clash.Num.Erroring

Methods

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

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

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

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

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

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

Defined in Clash.Num.Erroring

Methods

showsPrec :: Int -> Erroring a -> ShowS #

show :: Erroring a -> String #

showList :: [Erroring a] -> ShowS #

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

Methods

put :: Erroring a -> Put #

get :: Get (Erroring a) #

putList :: [Erroring a] -> Put #

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

Defined in Clash.Num.Erroring

Methods

rnf :: Erroring a -> () #

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

Defined in Clash.Num.Erroring

Methods

hashWithSalt :: Int -> Erroring a -> Int #

hash :: Erroring a -> Int #

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