                 }
                 output.append("],\n")
             }
-        }
-        output.append("""
-                ]
-
+            output.append("    ]\n\n")
+        }
+        output.append("""
                 private func isSubtype(_ subtype: DeclarationType, _ type: DeclarationType) -> Bool {
                     if subtype == type { return true }
                     for supertype in supertypes[subtype, default: []] {

        }
        output.append("""
                        }
                        releaseResult[i]?.forEach { runtime.results[$0] = nil }
                    }
                    if !function.hasReturnStep { return nil }
                    let returnValue = value(function.returnStep, in: stack)

                    try typecheck(stack: [TypecheckRuntime(function: function, arguments: arguments, returnType: returnType)], codePath: [], callStack: [])
                }

                private func value(_ a: Function.A, in stack: [Runtime]) -> Any {
                    if a.step >= 0 {
                        return stack[Int(a.level)].results[Int(a.step)]!
                    } else {
