today, attempting to do this both requires an instance of the new type and produces a compiler warning. we should offer a special case for this that makes the type signatures 'just work' without requiring a value and doesn't emit a compiler warning. example:
struct WF: Workflow {
typealias Output = Never
typealias State = Void
typealias Rendering = Int
func render(state: State, context: RenderContext<WF>) -> Rendering {
return 0
}
}
func test(_ rc: RenderContext<WF>) {
enum NewOutput {
case zero
}
let z: AnyWorkflow<String, NewOutput> = WF()
.mapRendering { "\($0)" }
.mapOutput { _ in .zero } // ⚠️ Will never be executed
.asAnyWorkflow()
}