In both cases we should create the function in the module. In the FuncDefn case we should push_todo_func.
To test this properly the test scaffolding will need to be improved. Recommend factoring out a SimpleFuncBuilder from SimpleHugrBuilder and introducing a new ComplexHugrBuilder with an add_func_defn method that returns a SimpleFuncBuilder
Note that we should test scoped definitions appearing anywhere they are allowed. As children of: Module, FuncDefn, Conditional, CFG, DataflowBlock, Case, DFG, TailLoop.
Only for
FuncDe{cl,fn}
with no type params.In both cases we should create the function in the module. In the
FuncDefn
case we shouldpush_todo_func
.To test this properly the test scaffolding will need to be improved. Recommend factoring out a
SimpleFuncBuilder
fromSimpleHugrBuilder
and introducing a newComplexHugrBuilder
with anadd_func_defn
method that returns aSimpleFuncBuilder
Note that we should test scoped definitions appearing anywhere they are allowed. As children of: Module, FuncDefn, Conditional, CFG, DataflowBlock, Case, DFG, TailLoop.