remove useless IO in the monad stack of the typechecker