fix bugs in 'new' inference by moving the logic into Infer.hs and not trying to do translation trickery