Monadify coreSyn/CorePrep: use do, return, applicative, standard monad functions