diff options
author | Josh Meredith <joshmeredith2008@gmail.com> | 2019-12-04 23:39:28 +1100 |
---|---|---|
committer | Josh Meredith <joshmeredith2008@gmail.com> | 2019-12-04 23:39:28 +1100 |
commit | a8435165b84c32fd2ebdd1281dd6ee077e07ad5a (patch) | |
tree | 791936d014aeaa26174c2dcbef34c14f3329dd04 /compiler/deSugar/MatchCon.hs | |
parent | 7805441b4d5e22eb63a501e1e40383d10380dc92 (diff) | |
parent | f03a41d4bf9418ee028ecb51654c928b2da74edd (diff) | |
download | haskell-wip/binary-readerT.tar.gz |
Merge branch 'master' into wip/binary-readerTwip/binary-readerT
Diffstat (limited to 'compiler/deSugar/MatchCon.hs')
-rw-r--r-- | compiler/deSugar/MatchCon.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/deSugar/MatchCon.hs b/compiler/deSugar/MatchCon.hs index be65433c3b..43d71acfdf 100644 --- a/compiler/deSugar/MatchCon.hs +++ b/compiler/deSugar/MatchCon.hs @@ -170,7 +170,7 @@ matchOneConLike vars ty (eqn1 : eqns) -- All eqns for a single constructor alt_wrapper = wrapper1, alt_result = foldr1 combineMatchResults match_results } } where - ConPatOut { pat_con = (dL->L _ con1) + ConPatOut { pat_con = L _ con1 , pat_arg_tys = arg_tys, pat_wrap = wrapper1, pat_tvs = tvs1, pat_dicts = dicts1, pat_args = args1 } = firstPat eqn1 @@ -192,7 +192,7 @@ matchOneConLike vars ty (eqn1 : eqns) -- All eqns for a single constructor = arg_vars where fld_var_env = mkNameEnv $ zipEqual "get_arg_vars" fields1 arg_vars - lookup_fld (dL->L _ rpat) = lookupNameEnv_NF fld_var_env + lookup_fld (L _ rpat) = lookupNameEnv_NF fld_var_env (idName (unLoc (hsRecFieldId rpat))) select_arg_vars _ [] = panic "matchOneCon/select_arg_vars []" matchOneConLike _ _ [] = panic "matchOneCon []" @@ -209,7 +209,7 @@ compatible_pats _ _ = True -- Prefix or infix co same_fields :: HsRecFields GhcTc (LPat GhcTc) -> HsRecFields GhcTc (LPat GhcTc) -> Bool same_fields flds1 flds2 - = all2 (\(dL->L _ f1) (dL->L _ f2) + = all2 (\(L _ f1) (L _ f2) -> unLoc (hsRecFieldId f1) == unLoc (hsRecFieldId f2)) (rec_flds flds1) (rec_flds flds2) |