- = addErrCtxt (cmdCtxt in_cmd) $
- addErrCtxt (caseScrutCtxt scrut) (
- tcInferRho scrut
- ) `thenM` \ (scrut', scrut_ty) ->
- tcMatchesCase match_ctxt scrut_ty matches res_ty `thenM` \ matches' ->
- returnM (HsCase scrut' matches')
+ = addErrCtxt (cmdCtxt in_cmd) $ do
+ (scrut', scrut_ty) <- tcInferRho scrut
+ matches' <- tcMatchesCase match_ctxt scrut_ty matches res_ty
+ return (HsCase scrut' matches')