From 06f1170bed5237766b53306a9ad088e4b151939e Mon Sep 17 00:00:00 2001 From: Shayne Fletcher Date: Sun, 21 Feb 2021 11:48:17 -0500 Subject: Record dot syntax --- compiler/GHC/HsToCore/Quote.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'compiler/GHC/HsToCore/Quote.hs') diff --git a/compiler/GHC/HsToCore/Quote.hs b/compiler/GHC/HsToCore/Quote.hs index d3453fcd56..149c683d83 100644 --- a/compiler/GHC/HsToCore/Quote.hs +++ b/compiler/GHC/HsToCore/Quote.hs @@ -1581,10 +1581,15 @@ repE (RecordCon { rcon_con = c, rcon_flds = flds }) = do { x <- lookupLOcc c; fs <- repFields flds; repRecCon x fs } -repE (RecordUpd { rupd_expr = e, rupd_flds = flds }) +repE (RecordUpd { rupd_expr = e, rupd_flds = Left flds }) = do { x <- repLE e; fs <- repUpdFields flds; repRecUpd x fs } +repE (RecordUpd { rupd_flds = Right _ }) + = do + -- Not possible due to elimination in the renamer. See Note + -- [Handling overloaded and rebindable constructs] + panic "The impossible has happened!" repE (ExprWithTySig _ e wc_ty) = addSimpleTyVarBinds (get_scoped_tvs_from_sig sig_ty) $ -- cgit v1.2.1