plutus-core-1.0.0.1: Language library for Plutus Core
Safe Haskell None
Language Haskell2010

Data.SatInt

Description

Adapted from SafeInt to perform saturating arithmetic (i.e. returning max or min bounds) instead of throwing on overflow.

This is not quite as fast as using Int or Int64 directly, but we need the safety.

Documentation

data SatInt Source #

Instances

Instances details
Bounded SatInt Source #
Instance details

Defined in Data.SatInt

Enum SatInt Source #
Instance details

Defined in Data.SatInt

Eq SatInt Source #
Instance details

Defined in Data.SatInt

Integral SatInt Source #
Instance details

Defined in Data.SatInt

Num SatInt Source #

In the Num instance, we plug in our own addition, multiplication and subtraction function that perform overflow-checking.

Instance details

Defined in Data.SatInt

Ord SatInt Source #
Instance details

Defined in Data.SatInt

Read SatInt Source #
Instance details

Defined in Data.SatInt

Real SatInt Source #
Instance details

Defined in Data.SatInt

Show SatInt Source #
Instance details

Defined in Data.SatInt

Generic SatInt Source #
Instance details

Defined in Data.SatInt

ToJSON SatInt Source #
Instance details

Defined in Data.SatInt

FromJSON SatInt Source #
Instance details

Defined in Data.SatInt

Bits SatInt Source #
Instance details

Defined in Data.SatInt

FiniteBits SatInt Source #
Instance details

Defined in Data.SatInt

NFData SatInt Source #
Instance details

Defined in Data.SatInt

FromField SatInt Source #
Instance details

Defined in Data.SatInt

Prim SatInt Source #
Instance details

Defined in Data.SatInt

NoThunks SatInt Source #
Instance details

Defined in Data.SatInt

ExMemoryUsage SatInt Source #
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Lift SatInt Source #
Instance details

Defined in Data.SatInt

type Rep SatInt Source #
Instance details

Defined in Data.SatInt

type Rep SatInt = D1 (' MetaData "SatInt" "Data.SatInt" "plutus-core-1.0.0.1-76bWF9ZEWyb4eDyjHx0kCS" ' True ) ( C1 (' MetaCons "SI" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unSatInt") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Int )))