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

PlutusIR.AstSize

Synopsis

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 :: forall tyname (uni :: Type -> Type) ann. Type tyname uni ann -> AstSize #

Count the number of AST nodes in a type.

tyVarDeclAstSize :: TyVarDecl tyname ann -> AstSize #

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

Count the number of AST nodes in a term.

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