diff options
Diffstat (limited to 'compiler/GHC')
-rw-r--r-- | compiler/GHC/Hs/Expr.hs | 10 | ||||
-rw-r--r-- | compiler/GHC/HsToCore/Expr.hs | 9 |
2 files changed, 10 insertions, 9 deletions
diff --git a/compiler/GHC/Hs/Expr.hs b/compiler/GHC/Hs/Expr.hs index cb8eb6d935..863c68e956 100644 --- a/compiler/GHC/Hs/Expr.hs +++ b/compiler/GHC/Hs/Expr.hs @@ -424,9 +424,13 @@ type instance XRecordCon GhcPs = EpAnn [AddEpAnn] type instance XRecordCon GhcRn = NoExtField type instance XRecordCon GhcTc = PostTcExpr -- Instantiated constructor function -type instance XRecordUpd GhcPs = EpAnn [AddEpAnn] -type instance XRecordUpd GhcRn = NoExtField -type instance XRecordUpd GhcTc = RecordUpdTc +type instance XRecordUpdField GhcPs = EpAnn [AddEpAnn] +type instance XRecordUpdField GhcRn = NoExtField +type instance XRecordUpdField GhcTc = RecordUpdTc + +type instance XRecordUpdProj GhcPs = EpAnn [AddEpAnn] +type instance XRecordUpdProj GhcRn = NoExtField +type instance XRecordUpdProj GhcTc = DataConCantHappen type instance XGetField GhcPs = EpAnnCO type instance XGetField GhcRn = NoExtField diff --git a/compiler/GHC/HsToCore/Expr.hs b/compiler/GHC/HsToCore/Expr.hs index c9e25c4582..7664420274 100644 --- a/compiler/GHC/HsToCore/Expr.hs +++ b/compiler/GHC/HsToCore/Expr.hs @@ -580,12 +580,9 @@ we want, namely -} -dsExpr RecordUpd { rupd_flds = Right _} = - -- Not possible due to elimination in the renamer. See Note - -- [Handling overloaded and rebindable constructs] - panic "The impossible happened" -dsExpr expr@(RecordUpd { rupd_expr = record_expr, rupd_flds = Left fields - , rupd_ext = RecordUpdTc +dsExpr expr@(RecordUpdField { rupd_ext = e } = dataConCantHappen e +dsExpr expr@(RecordUpdProj { rupd_expr = record_expr, rupd_flds = fields + , rupd_ext = RecordUpdTc { rupd_cons = cons_to_upd , rupd_in_tys = in_inst_tys , rupd_out_tys = out_inst_tys |