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

PlutusCore.AstSize

Synopsis

Documentation

newtype AstSize #

Constructors

AstSize 

Fields

Instances

Instances details
Monoid AstSize # 
Instance details

Defined in PlutusCore.AstSize

Semigroup AstSize # 
Instance details

Defined in PlutusCore.AstSize

Num AstSize # 
Instance details

Defined in PlutusCore.AstSize

Show AstSize # 
Instance details

Defined in PlutusCore.AstSize

Eq AstSize # 
Instance details

Defined in PlutusCore.AstSize

Methods

(==) :: AstSize -> AstSize -> Bool #

(/=) :: AstSize -> AstSize -> Bool #

Ord AstSize # 
Instance details

Defined in PlutusCore.AstSize

Pretty AstSize # 
Instance details

Defined in PlutusCore.AstSize

Methods

pretty :: AstSize -> Doc ann #

prettyList :: [AstSize] -> Doc ann #

PrettyBy config AstSize # 
Instance details

Defined in PlutusCore.AstSize

Methods

prettyBy :: config -> AstSize -> Doc ann #

prettyListBy :: config -> [AstSize] -> Doc ann #

kindAstSize :: Kind a -> AstSize #

Count the number of AST nodes in a kind.

>>> kindAstSize $ Type ()
AstSize {unAstSize = 1}
>>> kindAstSize $ KindArrow () (KindArrow () (Type ()) (Type ())) (Type ())
AstSize {unAstSize = 5} 

typeAstSize :: Type tyname uni ann -> AstSize #

Count the number of AST nodes in a type.

termAstSize :: Term tyname name uni fun ann -> AstSize #

Count the number of AST nodes in a term.

varDeclAstSize :: VarDecl tyname name uni ann -> AstSize #

programAstSize :: Program tyname name uni fun ann -> AstSize #

Count the number of AST nodes in a program.

serialisedAstSize :: Flat a => a -> Integer #

Compute the size of the serializabled form of a value.