herdtools7.asllib
TopoSort.ASTFold
Entry-point for dependency-ordered iterations on ASTs.
type step =
| Single of AST.decl
A single declaration that is not recursive.
| Recursive of AST.decl list
A set of mutually recursive definitions.
A step in the strongly-connected folder.
val fold : (step -> 'acc -> 'acc) -> AST.t -> 'acc -> 'acc
fold f ast is the iterations of f on all mutually recursive declarations in ast ordered by their definitions.
fold f ast
f
ast