parsing defines into letrecs