plutarch-1.9.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Plutarch.Integer

Synopsis

Type

data PInteger s Source #

Plutus BuiltinInteger

Instances

Instances details
PIsData PInteger Source # 
Instance details

Defined in Plutarch.Builtin

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData PInteger) -> Term s PInteger Source #

pdataImpl :: forall (s :: S). Term s PInteger -> Term s PData Source #

PCountable PInteger Source #

@since WIP

Instance details

Defined in Plutarch.Enum

Methods

psuccessor :: forall (s :: S). Term s (PInteger :--> PInteger) Source #

psuccessorN :: forall (s :: S). Term s (PPositive :--> (PInteger :--> PInteger)) Source #

PEnumerable PInteger Source #

@since WIP

Instance details

Defined in Plutarch.Enum

Methods

ppredecessor :: forall (s :: S). Term s (PInteger :--> PInteger) Source #

ppredecessorN :: forall (s :: S). Term s (PPositive :--> (PInteger :--> PInteger)) Source #

PIntegral PInteger Source # 
Instance details

Defined in Plutarch.Integer

Methods

pdiv :: forall (s :: S). Term s (PInteger :--> (PInteger :--> PInteger)) Source #

pmod :: forall (s :: S). Term s (PInteger :--> (PInteger :--> PInteger)) Source #

pquot :: forall (s :: S). Term s (PInteger :--> (PInteger :--> PInteger)) Source #

prem :: forall (s :: S). Term s (PInteger :--> (PInteger :--> PInteger)) Source #

PEq PInteger Source # 
Instance details

Defined in Plutarch.Integer

Methods

(#==) :: forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PBool Source #

PLiftable PInteger Source # 
Instance details

Defined in Plutarch.Integer

POrd PInteger Source # 
Instance details

Defined in Plutarch.Integer

Methods

pmax :: forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PInteger Source #

pmin :: forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PInteger Source #

PPartialOrd PInteger Source # 
Instance details

Defined in Plutarch.Integer

Methods

(#<=) :: forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PBool Source #

(#<) :: forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PBool Source #

(#>=) :: forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PBool Source #

(#>) :: forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PBool Source #

DerivePlutusType PInteger Source # 
Instance details

Defined in Plutarch.Integer

Associated Types

type DPTStrat PInteger Source #

PlutusType PInteger Source # 
Instance details

Defined in Plutarch.Integer

Methods

pcon' :: forall (s :: S). PInteger s -> Term s (PInner PInteger) Source #

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner PInteger) -> (PInteger s -> Term s b) -> Term s b Source #

PNum PInteger Source # 
Instance details

Defined in Plutarch.Integer

Methods

(#+) :: forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PInteger Source #

(#-) :: forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PInteger Source #

(#*) :: forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PInteger Source #

pnegate :: forall (s :: S). Term s (PInteger :--> PInteger) Source #

pabs :: forall (s :: S). Term s (PInteger :--> PInteger) Source #

psignum :: forall (s :: S). Term s (PInteger :--> PInteger) Source #

pfromInteger :: forall (s :: S). Integer -> Term s PInteger Source #

PShow PInteger Source # 
Instance details

Defined in Plutarch.Show

Methods

pshow' :: forall (s :: S). Bool -> Term s PInteger -> Term s PString Source #

PTryFrom PInteger PPositive Source # 
Instance details

Defined in Plutarch.Positive

Associated Types

type PTryFromExcess PInteger PPositive :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PInteger -> ((Term s PPositive, Reduce (PTryFromExcess PInteger PPositive s)) -> Term s r) -> Term s r Source #

PTryFrom PData (PAsData PInteger) Source # 
Instance details

Defined in Plutarch.Builtin

Associated Types

type PTryFromExcess PData (PAsData PInteger) :: PType Source #

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PInteger), Reduce (PTryFromExcess PData (PAsData PInteger) s)) -> Term s r) -> Term s r Source #

Generic (PInteger s) Source # 
Instance details

Defined in Plutarch.Integer

Associated Types

type Rep (PInteger s) :: Type -> Type Source #

Methods

from :: PInteger s -> Rep (PInteger s) x Source #

to :: Rep (PInteger s) x -> PInteger s Source #

PIsData (PBuiltinPair PInteger (PBuiltinList PData)) Source # 
Instance details

Defined in Plutarch.Builtin

type AsHaskell PInteger Source #

@since WIP

Instance details

Defined in Plutarch.Integer

type PlutusRepr PInteger Source # 
Instance details

Defined in Plutarch.Integer

type DPTStrat PInteger Source # 
Instance details

Defined in Plutarch.Integer

type PContravariant' PInteger Source # 
Instance details

Defined in Plutarch.Integer

type PCovariant' PInteger Source # 
Instance details

Defined in Plutarch.Integer

type PInner PInteger Source # 
Instance details

Defined in Plutarch.Integer

type PVariant' PInteger Source # 
Instance details

Defined in Plutarch.Integer

type PTryFromExcess PInteger PPositive Source # 
Instance details

Defined in Plutarch.Positive

type PTryFromExcess PData (PAsData PInteger) Source # 
Instance details

Defined in Plutarch.Builtin

type Rep (PInteger s) Source # 
Instance details

Defined in Plutarch.Integer

type Rep (PInteger s) = D1 ('MetaData "PInteger" "Plutarch.Integer" "plutarch-1.9.0-DaxzFvLNVysDL1hkJ4YFrw" 'True) (C1 ('MetaCons "PInteger" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s POpaque))))

Type class

class PIntegral a where Source #

Minimal complete definition

Nothing

Methods

pdiv :: Term s (a :--> (a :--> a)) Source #

default pdiv :: PIntegral (PInner a) => Term s (a :--> (a :--> a)) Source #

pmod :: Term s (a :--> (a :--> a)) Source #

default pmod :: PIntegral (PInner a) => Term s (a :--> (a :--> a)) Source #

pquot :: Term s (a :--> (a :--> a)) Source #

default pquot :: PIntegral (PInner a) => Term s (a :--> (a :--> a)) Source #

prem :: Term s (a :--> (a :--> a)) Source #

default prem :: PIntegral (PInner a) => Term s (a :--> (a :--> a)) Source #

Instances

Instances details
PIntegral PInteger Source # 
Instance details

Defined in Plutarch.Integer

Methods

pdiv :: forall (s :: S). Term s (PInteger :--> (PInteger :--> PInteger)) Source #

pmod :: forall (s :: S). Term s (PInteger :--> (PInteger :--> PInteger)) Source #

pquot :: forall (s :: S). Term s (PInteger :--> (PInteger :--> PInteger)) Source #

prem :: forall (s :: S). Term s (PInteger :--> (PInteger :--> PInteger)) Source #

PIntegral PPositive Source # 
Instance details

Defined in Plutarch.Positive

Methods

pdiv :: forall (s :: S). Term s (PPositive :--> (PPositive :--> PPositive)) Source #

pmod :: forall (s :: S). Term s (PPositive :--> (PPositive :--> PPositive)) Source #

pquot :: forall (s :: S). Term s (PPositive :--> (PPositive :--> PPositive)) Source #

prem :: forall (s :: S). Term s (PPositive :--> (PPositive :--> PPositive)) Source #

Functions

pexpModInteger :: forall (s :: S). Term s (PInteger :--> (PInteger :--> (PInteger :--> PInteger))) Source #

Performs modulo exponentiation. More precisely, pexpModInteger b e m performs b to the power of e, modulo m. The result is always non-negative.

Note

This will error if the modulus is zero. When given a negative exponent, this will try to find a modular multiplicative inverse, and will error if none exists.

@since WIP