plutarch-1.9.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Plutarch.Num

Documentation

class PNum (a :: PType) where Source #

Minimal complete definition

Nothing

Methods

(#+) :: Term s a -> Term s a -> Term s a infix 6 Source #

default (#+) :: PNum (PInner a) => Term s a -> Term s a -> Term s a Source #

(#-) :: Term s a -> Term s a -> Term s a infix 6 Source #

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

(#*) :: Term s a -> Term s a -> Term s a infix 6 Source #

default (#*) :: PNum (PInner a) => Term s a -> Term s a -> Term s a Source #

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

default pnegate :: PNum (PInner a) => Term s (a :--> a) Source #

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

default pabs :: PNum (PInner a) => Term s (a :--> a) Source #

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

default psignum :: PNum (PInner a) => Term s (a :--> a) Source #

pfromInteger :: Integer -> Term s a Source #

default pfromInteger :: PNum (PInner a) => Integer -> Term s a Source #

Instances

Instances details
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 #

PNum PPositive Source # 
Instance details

Defined in Plutarch.Positive

Methods

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

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

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

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

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

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

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

PNum PRational Source # 
Instance details

Defined in Plutarch.Rational

Methods

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

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

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

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

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

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

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

Orphan instances

PNum a => Num (Term s a) Source # 
Instance details

Methods

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

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

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

negate :: Term s a -> Term s a Source #

abs :: Term s a -> Term s a Source #

signum :: Term s a -> Term s a Source #

fromInteger :: Integer -> Term s a Source #