infers letrec
infers case and letrec, other fixes