plutarch-1.3.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Plutarch.Rational

Synopsis

Documentation

data PRational s Source #

Note: This type is _not_ the synonym of Rational.

Constructors

PRational (Term s PInteger) (Term s PPositive) 

Instances

Instances details
PEq PRational Source # 
Instance details

Defined in Plutarch.Rational

Methods

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

POrd PRational Source # 
Instance details

Defined in Plutarch.Rational

PPartialOrd PRational Source # 
Instance details

Defined in Plutarch.Rational

Methods

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

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

PIsData PRational Source #

This instance _does not_ correspond to Rationals data encoding.

Instance details

Defined in Plutarch.Rational

Methods

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

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

DerivePlutusType PRational Source # 
Instance details

Defined in Plutarch.Rational

Associated Types

type DPTStrat PRational Source #

PlutusType PRational Source # 
Instance details

Defined in Plutarch.Rational

Methods

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

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner PRational) -> (PRational s -> Term s b) -> Term s b 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 #

PFractional PRational Source # 
Instance details

Defined in Plutarch.Rational

Methods

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

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

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

PShow PRational Source # 
Instance details

Defined in Plutarch.Rational

Methods

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

PTryFrom PData (PAsData PRational) Source #

NOTE: This instance produces a verified PPositive as the excess output.

Instance details

Defined in Plutarch.Rational

Associated Types

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

Methods

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

Generic (PRational s) Source # 
Instance details

Defined in Plutarch.Rational

Associated Types

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

Methods

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

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

type DPTStrat PRational Source # 
Instance details

Defined in Plutarch.Rational

type PContravariant' PRational Source # 
Instance details

Defined in Plutarch.Rational

type PCovariant' PRational Source # 
Instance details

Defined in Plutarch.Rational

type PInner PRational Source # 
Instance details

Defined in Plutarch.Rational

type PVariant' PRational Source # 
Instance details

Defined in Plutarch.Rational

type PTryFromExcess PData (PAsData PRational) Source # 
Instance details

Defined in Plutarch.Rational

type Rep (PRational s) Source # 
Instance details

Defined in Plutarch.Rational

type Rep (PRational s) = D1 ('MetaData "PRational" "Plutarch.Rational" "plutarch-1.3.0-287WdR4V4qr3NTh5i3Je4I" 'False) (C1 ('MetaCons "PRational" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s PInteger)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s PPositive))))

class PFractional (a :: PType) where Source #

Methods

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

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

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

Instances

Instances details
PFractional PRational Source # 
Instance details

Defined in Plutarch.Rational

Methods

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

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

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

Orphan instances

(PNum a, PFractional a) => Fractional (Term s a) Source # 
Instance details

Methods

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

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

fromRational :: Rational -> Term s a Source #