morley-1.20.0: Developer tools for the Michelson Language
Safe HaskellSafe-Inferred
LanguageHaskell2010

Morley.Michelson.Typed.ClassifiedInstr.Internal.Classifiers.NumChildren

Description

Actual decision implementation for NumChildren.

Synopsis

Documentation

numChildren :: [Type] -> NumChildren Source #

Given a list of constructor arguments, count how many of those arguments are instructions (i.e. Instr), and return the corresponding classification. There is one unfortunate case of ambiguity in ExtInstr we have to handle manually. If arguments mention Instr indirectly, e.g. Value' Instr t HasIndirectChildren is returned instead.