plutus-tx-1.36.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]

omittedField :: Maybe 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

toJSON :: Integer -> Value

toEncoding :: Integer -> Encoding

toJSONList :: [Integer] -> Value

toEncodingList :: [Integer] -> Encoding

omitField :: Integer -> Bool

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 :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Integer -> c Integer Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Integer Source #

toConstr :: Integer -> Constr Source #

dataTypeOf :: Integer -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Integer) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Integer) Source #

gmapT :: (forall b. Data b => b -> b) -> Integer -> Integer Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Integer -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Integer -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Integer -> m Integer Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer Source #

gmapMo :: MonadPlus m => (forall 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

(-) :: Integer -> Integer -> Difference Integer

Default Integer 
Instance details

Defined in Data.Default.Class

Methods

def :: Integer

NFData Integer 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Integer -> () Source #

Eq Integer 
Instance details

Defined in GHC.Num.Integer

Ord Integer 
Instance details

Defined in GHC.Num.Integer

Hashable Integer 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Integer -> Int

hash :: Integer -> Int

HasBlueprintDefinition Integer Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

Associated Types

type Unroll Integer :: [Type] Source #

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 #

MkNil BuiltinInteger Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

Enum Integer Source # 
Instance details

Defined in PlutusTx.Enum

Eq Integer Source # 
Instance details

Defined in PlutusTx.Eq

Methods

(==) :: Integer -> Integer -> Bool 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

(-) :: Integer -> Integer -> Integer Source #

AdditiveMonoid Integer Source # 
Instance details

Defined in PlutusTx.Numeric

Methods

zero :: Integer Source #

AdditiveSemigroup Integer Source # 
Instance details

Defined in PlutusTx.Numeric

Methods

(+) :: Integer -> Integer -> Integer Source #

MultiplicativeMonoid Integer Source # 
Instance details

Defined in PlutusTx.Numeric

Methods

one :: Integer Source #

MultiplicativeSemigroup Integer Source # 
Instance details

Defined in PlutusTx.Numeric

Methods

(*) :: Integer -> Integer -> Integer 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

pretty :: Integer -> Doc 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

encode :: Integer -> Encoding

decode :: Decoder s Integer

encodeList :: [Integer] -> Encoding

decodeList :: Decoder s [Integer]

Pretty Rational 
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Methods

pretty :: Rational -> Doc b

prettyList :: [Rational] -> Doc b

Pretty Integer 
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Methods

pretty :: Integer -> Doc b

prettyList :: [Integer] -> Doc b

HasBlueprintSchema Integer referencedTypes Source # 
Instance details

Defined in PlutusTx.Blueprint.Class

Methods

schema :: Schema referencedTypes Source #

HasFromOpaque BuiltinInteger BuiltinInteger Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasToOpaque BuiltinInteger BuiltinInteger Source # 
Instance details

Defined in PlutusTx.Builtins.HasOpaque

HasTermLevel uni Integer => Lift uni BuiltinInteger Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

lift :: BuiltinInteger -> RTCompile uni fun (Term TyName Name uni fun ()) Source #

Module Integer Rational Source # 
Instance details

Defined in PlutusTx.Ratio

DefaultPrettyBy config Integer 
Instance details

Defined in Text.PrettyBy.Internal

Methods

defaultPrettyBy :: config -> Integer -> Doc ann

defaultPrettyListBy :: config -> [Integer] -> Doc ann

NonDefaultPrettyBy ConstConfig Integer 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

nonDefaultPrettyBy :: ConstConfig -> Integer -> Doc ann

nonDefaultPrettyListBy :: ConstConfig -> [Integer] -> Doc ann

PrettyDefaultBy config Integer => PrettyBy config Integer 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Integer -> Doc ann

prettyListBy :: config -> [Integer] -> Doc ann

Lift Integer 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Integer -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Integer -> Code m Integer Source #

KnownBuiltinTypeIn DefaultUni term Integer => MakeKnownIn DefaultUni term Integer 
Instance details

Defined in PlutusCore.Default.Universe

Methods

makeKnown :: Integer -> BuiltinResult term

KnownBuiltinTypeIn DefaultUni term Integer => ReadKnownIn DefaultUni term Integer 
Instance details

Defined in PlutusCore.Default.Universe

Methods

readKnown :: term -> ReadKnownM Integer

Contains DefaultUni Integer 
Instance details

Defined in PlutusCore.Default.Universe

Methods

knownUni :: DefaultUni (Esc Integer)

HasTypeLevel uni Integer => Typeable uni BuiltinInteger Source # 
Instance details

Defined in PlutusTx.Lift.Class

Methods

typeRep :: Proxy BuiltinInteger -> RTCompile 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 Integer => KnownTypeAst tyname DefaultUni Integer 
Instance details

Defined in PlutusCore.Default.Universe

Associated Types

type IsBuiltin DefaultUni Integer :: Bool

type ToHoles DefaultUni Integer :: [Hole]

type ToBinds DefaultUni acc Integer :: [Some TyNameRep]

Methods

typeAst :: Type tyname DefaultUni ()

type Difference Integer 
Instance details

Defined in Basement.Numerical.Subtractive

type Difference Integer = Integer
type Unroll Integer Source # 
Instance details

Defined in PlutusTx.Blueprint.Definition.Unroll

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 IsBuiltin DefaultUni Integer = IsBuiltin DefaultUni (ElaborateBuiltin DefaultUni Integer)
type ToHoles DefaultUni Integer 
Instance details

Defined in PlutusCore.Default.Universe

type ToHoles DefaultUni Integer = ToHoles DefaultUni (ElaborateBuiltin DefaultUni Integer)
type ToBinds DefaultUni acc Integer 
Instance details

Defined in PlutusCore.Default.Universe

type ToBinds DefaultUni acc Integer = ToBinds DefaultUni acc (ElaborateBuiltin DefaultUni Integer)