plutus-core
Safe HaskellNone
LanguageHaskell2010

PlutusCore.AstSize

Synopsis

Documentation

newtype AstSize Source #

Constructors

AstSize 

Fields

Instances

Instances details
Monoid AstSize Source # 
Instance details

Defined in PlutusCore.AstSize

Semigroup AstSize Source # 
Instance details

Defined in PlutusCore.AstSize

Num AstSize Source # 
Instance details

Defined in PlutusCore.AstSize

Show AstSize Source # 
Instance details

Defined in PlutusCore.AstSize

Eq AstSize Source # 
Instance details

Defined in PlutusCore.AstSize

Ord AstSize Source # 
Instance details

Defined in PlutusCore.AstSize

Pretty AstSize Source # 
Instance details

Defined in PlutusCore.AstSize

Methods

pretty :: AstSize -> Doc ann #

prettyList :: [AstSize] -> Doc ann #

PrettyBy config AstSize Source # 
Instance details

Defined in PlutusCore.AstSize

Methods

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

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

kindAstSize :: Kind a -> AstSize Source #

Count the number of AST nodes in a kind.

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

typeAstSize :: forall tyname (uni :: Type -> Type) ann. Type tyname uni ann -> AstSize Source #

Count the number of AST nodes in a type.

termAstSize :: forall tyname name (uni :: Type -> Type) fun ann. Term tyname name uni fun ann -> AstSize Source #

Count the number of AST nodes in a term.

varDeclAstSize :: forall tyname name (uni :: Type -> Type) ann. VarDecl tyname name uni ann -> AstSize Source #

programAstSize :: forall tyname name (uni :: Type -> Type) fun ann. Program tyname name uni fun ann -> AstSize Source #

Count the number of AST nodes in a program.

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

Compute the size of the serializabled form of a value.