diff options
Diffstat (limited to 'compiler/GHC/HsToCore/Expr.hs')
-rw-r--r-- | compiler/GHC/HsToCore/Expr.hs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/GHC/HsToCore/Expr.hs b/compiler/GHC/HsToCore/Expr.hs index ffa4e9323f..9a8e3d5029 100644 --- a/compiler/GHC/HsToCore/Expr.hs +++ b/compiler/GHC/HsToCore/Expr.hs @@ -31,7 +31,7 @@ import GHC.HsToCore.ListComp import GHC.HsToCore.Utils import GHC.HsToCore.Arrows import GHC.HsToCore.Monad -import GHC.HsToCore.PmCheck ( addTyCsDs, checkGuardMatches ) +import GHC.HsToCore.PmCheck ( addTyCsDs, checkGRHSs ) import GHC.Types.Name import GHC.Types.Name.Env import GHC.Core.FamInstEnv( topNormaliseType ) @@ -69,7 +69,6 @@ import GHC.Utils.Outputable as Outputable import GHC.Core.PatSyn import Control.Monad -import Data.List.NonEmpty ( nonEmpty ) {- ************************************************************************ @@ -215,8 +214,8 @@ dsUnliftedBind (PatBind {pat_lhs = pat, pat_rhs = grhss , pat_ext = NPatBindTc _ ty }) body = -- let C x# y# = rhs in body -- ==> case rhs of C x# y# -> body - do { rhs_deltas <- checkGuardMatches PatBindGuards grhss - ; rhs <- dsGuarded grhss ty (nonEmpty rhs_deltas) + do { match_deltas <- checkGRHSs PatBindGuards grhss + ; rhs <- dsGuarded grhss ty match_deltas ; let upat = unLoc pat eqn = EqnInfo { eqn_pats = [upat], eqn_orig = FromSource, @@ -486,8 +485,8 @@ dsExpr (HsMultiIf res_ty alts) | otherwise = do { let grhss = GRHSs noExtField alts (noLoc emptyLocalBinds) - ; rhss_deltas <- checkGuardMatches IfAlt grhss - ; match_result <- dsGRHSs IfAlt grhss res_ty (nonEmpty rhss_deltas) + ; rhss_deltas <- checkGRHSs IfAlt grhss + ; match_result <- dsGRHSs IfAlt grhss res_ty rhss_deltas ; error_expr <- mkErrorExpr ; extractMatchResult match_result error_expr } where |