-tcDoStmt m_ty ctxt (ExprStmt rhs then_op _) reft_res_ty@(_,res_ty) thing_inside
- = do { -- Deal with rebindable syntax; (>>) :: m a -> m b -> m b
- a_ty <- newFlexiTyVarTy liftedTypeKind
- ; let rhs_ty = mkAppTy m_ty a_ty
- then_ty = mkFunTys [rhs_ty, res_ty] res_ty
- ; then_op' <- tcSyntaxOp DoOrigin then_op then_ty
- ; rhs' <- tcPolyExpr rhs rhs_ty
+tcDoStmt ctxt (ExprStmt rhs then_op _) reft_res_ty@(_,res_ty) thing_inside
+ = do { (rhs', rhs_ty) <- tcInferRho rhs
+
+ -- Deal with rebindable syntax; (>>) :: rhs_ty -> res_ty -> res_ty
+ ; then_op' <- tcSyntaxOp DoOrigin then_op
+ (mkFunTys [rhs_ty, res_ty] res_ty)
+