             if functionType.argumentTypes.count > 0 {
                 output.append("            case .\(name)(let a):\n")
                 for (i, type) in functionType.argumentTypes.enumerated() {
-                    output.append("                try check(a.o\(i + 1), with: .\(type)Type, function: function, stack: stack, stepStack: stepStack)\n")
+                    output.append("                try check(a.o\(i + 1), with: .\(type)Type, function: function, stack: stack, callStack: callStack)\n")
                 }
             } else {
                 output.append("            case .\(name):\n")

                        }
                    }
                    if runtime.returnType != .none {
                        let stepStack = stepStack.appending(function.steps.count)
                        guard function.hasReturnStep else { throw DecodeError(cause: .returnMissing, stack: stepStack) }
                        try check(function.returnStep, with: runtime.returnType, function: function, stack: stack, stepStack: stepStack)
                    } else if function.hasReturnStep { throw DecodeError(cause: .returnMismatch, stack: stepStack) }
                    releaseResults[stepStack] = Dictionary(grouping: runtime.releaseResult.enumerated()) { $0.element }.mapValues { $0.map { $0.offset } }
                }
                
                func typecheck(function: Function, arguments: [DeclarationType], returnType: DeclarationType) throws {
                    try typecheck(function: function, stack: [TypecheckRuntime(arguments: arguments, returnType: returnType, count: function.steps.count)], stepStack: [])
                }

                private func value(_ a: Function.A, in stack: [Runtime<Any>]) -> Any {

        }
        output.append("""
                @discardableResult
                private func run(function: Function, symbols: Symbols, stack: [Runtime<Any>], callStack: IndexPath) -> Any? {
                    let runtime = stack.last!
                    let releaseResult = releaseResults[callStack]!
                    for (i, step) in function.steps.enumerated() {
                        let callStack = callStack + [i]
                        switch step.producer! {
                        case .functionRaw(let raw):
                            runtime.results[i] = raw\n
