Monadify typecheck/Inst: use do, return and standard monad functions