WIP: code gen for merging receiver