plutus-tx-1.30.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.Integer

Synopsis

Documentation

data Integer Source #

Arbitrary precision integers. In contrast with fixed-size integral types such as Int, the Integer type represents the entire infinite range of integers.

Integers are stored in a kind of sign-magnitude form, hence do not expect two's complement form when using bit operations.

If the value is small (fit into an Int), IS constructor is used. Otherwise Integer and IN constructors are used to store a BigNat representing respectively the positive or the negative value magnitude.

Invariant: Integer and IN are used iff value doesn't fit in IS

Instances

Instances details
FromJSON Integer 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON ∷ Value → Parser Integer

parseJSONList ∷ Value → Parser [Integer]

omittedFieldMaybe Integer

FromJSONKey Integer 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey ∷ FromJSONKeyFunction Integer

fromJSONKeyList ∷ FromJSONKeyFunction [Integer]

ToJSON Integer 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONInteger → Value

toEncodingInteger → Encoding

toJSONList ∷ [Integer] → Value

toEncodingList ∷ [Integer] → Encoding

omitFieldIntegerBool

ToJSONKey Integer 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey ∷ ToJSONKeyFunction Integer

toJSONKeyList ∷ ToJSONKeyFunction [Integer]

Data Integer

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → Integer → c Integer Source #

gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c Integer Source #

toConstrIntegerConstr Source #

dataTypeOfIntegerDataType Source #

dataCast1Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c Integer) Source #

dataCast2Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c Integer) Source #

gmapT ∷ (∀ b. Data b ⇒ b → b) → IntegerInteger Source #

gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → Integer → r Source #

gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → Integer → r Source #

gmapQ ∷ (∀ d. Data d ⇒ d → u) → Integer → [u] Source #

gmapQiInt → (∀ d. Data d ⇒ d → u) → Integer → u Source #

gmapMMonad m ⇒ (∀ d. Data d ⇒ d → m d) → Integer → m Integer Source #

gmapMpMonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Integer → m Integer Source #

gmapMoMonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Integer → m Integer Source #

Enum Integer

Since: base-2.1

Instance details

Defined in GHC.Enum

Ix Integer

Since: base-2.1

Instance details

Defined in GHC.Ix

Num Integer

Since: base-2.1

Instance details

Defined in GHC.Num

Read Integer

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Real Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Show Integer

Since: base-2.1

Instance details

Defined in GHC.Show

Subtractive Integer 
Instance details

Defined in Basement.Numerical.Subtractive

Associated Types

type Difference Integer

Methods

(-)IntegerInteger → Difference Integer

Default Integer 
Instance details

Defined in Data.Default.Class

Methods

defInteger #

NFData Integer 
Instance details

Defined in Control.DeepSeq

Methods

rnfInteger → () Source #

Eq Integer 
Instance details

Defined in GHC.Num.Integer

Methods

(==)IntegerIntegerBool Source #

(/=)IntegerIntegerBool Source #

Ord Integer 
Instance details

Defined in GHC.Num.Integer

Hashable Integer 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSaltIntIntegerInt

hashIntegerInt

HasFromBuiltin BuiltinInteger Source # 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

Associated Types

type FromBuiltin BuiltinInteger Source #

HasToBuiltin Integer Source # 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

Associated Types

type ToBuiltin Integer Source #

Enum Integer Source # 
Instance details

Defined in PlutusTx.Enum

Eq Integer Source # 
Instance details

Defined in PlutusTx.Eq

Methods

(==)IntegerIntegerBool Source #

FromData Integer Source # 
Instance details

Defined in PlutusTx.IsData.Class

ToData Integer Source # 
Instance details

Defined in PlutusTx.IsData.Class

UnsafeFromData Integer Source # 
Instance details

Defined in PlutusTx.IsData.Class

AdditiveGroup Integer Source # 
Instance details

Defined in PlutusTx.Numeric

Methods

(-)IntegerIntegerInteger Source #

AdditiveMonoid Integer Source # 
Instance details

Defined in PlutusTx.Numeric

Methods

zeroInteger Source #

AdditiveSemigroup Integer Source # 
Instance details

Defined in PlutusTx.Numeric

Methods

(+)IntegerIntegerInteger Source #

MultiplicativeMonoid Integer Source # 
Instance details

Defined in PlutusTx.Numeric

Methods

oneInteger Source #

MultiplicativeSemigroup Integer Source # 
Instance details

Defined in PlutusTx.Numeric

Methods

(*)IntegerIntegerInteger Source #

Ord Integer Source # 
Instance details

Defined in PlutusTx.Ord

Show Integer Source # 
Instance details

Defined in PlutusTx.Show

Pretty Integer 
Instance details

Defined in Prettyprinter.Internal

Methods

prettyIntegerDoc ann #

prettyList ∷ [Integer] → Doc ann #

UniformRange Integer 
Instance details

Defined in System.Random.Internal

Methods

uniformRM ∷ StatefulGen g m ⇒ (Integer, Integer) → g → m Integer

Serialise Integer 
Instance details

Defined in Codec.Serialise.Class

Methods

encodeInteger → Encoding

decode ∷ Decoder s Integer

encodeList ∷ [Integer] → Encoding

decodeList ∷ Decoder s [Integer]

Pretty Rational 
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Methods

prettyRational → Doc b

prettyList ∷ [Rational] → Doc b

Pretty Integer 
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Methods

prettyInteger → Doc b

prettyList ∷ [Integer] → Doc b

HasSchema Integer ts Source # 
Instance details

Defined in PlutusTx.Blueprint.Class

Methods

schemaSchema ts Source #

AsDefinitionId Integer Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Id

HasFromOpaque BuiltinInteger BuiltinInteger Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasToOpaque BuiltinInteger BuiltinInteger Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasTermLevel uni IntegerLift uni BuiltinInteger Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

liftBuiltinIntegerRTCompile uni fun (Term TyName Name uni fun ()) Source #

Module Integer Rational Source # 
Instance details

Defined in PlutusTx.Ratio

Methods

scaleIntegerRationalRational Source #

DefaultPrettyBy config Integer 
Instance details

Defined in Text.PrettyBy.Internal

Methods

defaultPrettyBy ∷ config → IntegerDoc ann Source #

defaultPrettyListBy ∷ config → [Integer] → Doc ann Source #

NonDefaultPrettyBy ConstConfig Integer 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

PrettyDefaultBy config IntegerPrettyBy config Integer
>>> prettyBy () (2^(123 :: Int) :: Integer)
10633823966279326983230456482242756608
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy ∷ config → IntegerDoc ann Source #

prettyListBy ∷ config → [Integer] → Doc ann Source #

Lift Integer 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

liftQuote m ⇒ Integer → m Exp Source #

liftTyped ∷ ∀ (m ∷ TypeType). Quote m ⇒ IntegerCode m Integer Source #

KnownBuiltinTypeIn DefaultUni term IntegerMakeKnownIn DefaultUni term Integer 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnownIntegerBuiltinResult term Source #

KnownBuiltinTypeIn DefaultUni term IntegerReadKnownIn DefaultUni term Integer 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown ∷ term → ReadKnownM Integer Source #

Contains DefaultUni Integer 
Instance details

Defined in PlutusCore.Default.Universe

HasTypeLevel uni IntegerTypeable uni BuiltinInteger Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRepProxy BuiltinIntegerRTCompile uni fun (Type TyName uni ()) Source #

KnownNat n ⇒ Reifies (n ∷ Nat) Integer 
Instance details

Defined in Data.Reflection

Methods

reflect ∷ proxy n → Integer

KnownBuiltinTypeAst tyname DefaultUni IntegerKnownTypeAst tyname DefaultUni Integer 
Instance details

Defined in PlutusCore.Default.Universe

Methods

typeAstType tyname DefaultUni () Source #

type Difference Integer 
Instance details

Defined in Basement.Numerical.Subtractive

type Difference Integer = Integer
type FromBuiltin BuiltinInteger Source # 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

type ToBuiltin Integer Source # 
Instance details

Defined in PlutusTx.Builtins.HasBuiltin

type IsBuiltin DefaultUni Integer 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Integer 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Integer 
Instance details

Defined in PlutusCore.Default.Universe