plutus-core-1.36.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusCore.Size

Synopsis

Documentation

newtype Size Source #

Constructors

Size 

Fields

Instances

Instances details
Monoid Size Source # 
Instance details

Defined in PlutusCore.Size

Semigroup Size Source # 
Instance details

Defined in PlutusCore.Size

Num Size Source # 
Instance details

Defined in PlutusCore.Size

Show Size Source # 
Instance details

Defined in PlutusCore.Size

Eq Size Source # 
Instance details

Defined in PlutusCore.Size

Methods

(==) :: Size -> Size -> Bool Source #

(/=) :: Size -> Size -> Bool Source #

Ord Size Source # 
Instance details

Defined in PlutusCore.Size

Pretty Size Source # 
Instance details

Defined in PlutusCore.Size

Methods

pretty :: Size -> Doc ann #

prettyList :: [Size] -> Doc ann #

kindSize :: Kind a -> Size Source #

Count the number of AST nodes in a kind.

>>> kindSize $ Type ()
Size {unSize = 1}
>>> kindSize $ KindArrow () (KindArrow () (Type ()) (Type ())) (Type ())
Size {unSize = 5}

typeSize :: Type tyname uni ann -> Size Source #

Count the number of AST nodes in a type.

termSize :: Term tyname name uni fun ann -> Size Source #

Count the number of AST nodes in a term.

varDeclSize :: VarDecl tyname name uni ann -> Size Source #

programSize :: Program tyname name uni fun ann -> Size Source #

Count the number of AST nodes in a program.

serialisedSize :: Flat a => a -> Integer Source #

Compute the size of the serializabled form of a value.