diff options
Diffstat (limited to 'compiler/GHC/HsToCore/Match.hs')
-rw-r--r-- | compiler/GHC/HsToCore/Match.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/GHC/HsToCore/Match.hs b/compiler/GHC/HsToCore/Match.hs index 425940624b..a007faa823 100644 --- a/compiler/GHC/HsToCore/Match.hs +++ b/compiler/GHC/HsToCore/Match.hs @@ -812,11 +812,10 @@ matchEquations :: HsMatchContext GhcRn -> [MatchId] -> [EquationInfo] -> Type -> DsM CoreExpr matchEquations ctxt vars eqns_info rhs_ty - = do { let error_doc = matchContextErrString ctxt + = do { match_result <- match vars rhs_ty eqns_info - ; match_result <- match vars rhs_ty eqns_info + ; fail_expr <- mkFailExpr ctxt rhs_ty - ; fail_expr <- mkErrorAppDs pAT_ERROR_ID rhs_ty error_doc ; extractMatchResult match_result fail_expr } -- | @matchSimply@ is a wrapper for 'match' which deals with the |