first draft of constant propagation through generated functions