diff options
Diffstat (limited to 'compiler/deSugar/MatchCon.lhs')
-rw-r--r-- | compiler/deSugar/MatchCon.lhs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/deSugar/MatchCon.lhs b/compiler/deSugar/MatchCon.lhs index 2b51638bf3..746adeb941 100644 --- a/compiler/deSugar/MatchCon.lhs +++ b/compiler/deSugar/MatchCon.lhs @@ -144,7 +144,7 @@ matchOneConLike vars ty (eqn1 : eqns) -- All eqns for a single constructor pat_tvs = tvs1, pat_dicts = dicts1, pat_args = args1 } = firstPat eqn1 fields1 = case con1 of - RealDataCon dcon1 -> dataConFieldLabels dcon1 + RealDataCon dcon1 -> map flSelector $ dataConFieldLabels dcon1 PatSynCon{} -> [] arg_tys = inst inst_tys @@ -211,8 +211,8 @@ compatible_pats _ _ = True -- Prefix or infix co same_fields :: HsRecFields Id (LPat Id) -> HsRecFields Id (LPat Id) -> Bool same_fields flds1 flds2 - = all2 (\f1 f2 -> unLoc (hsRecFieldId f1) == unLoc (hsRecFieldId f2)) - (rec_flds flds1) (rec_flds flds2) + = all2 (\f1 f2 -> hsRecFieldSel f1 == hsRecFieldSel f2) + (rec_flds flds1) (rec_flds flds2) ----------------- |