summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Utils/Zonk.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Tc/Utils/Zonk.hs')
-rw-r--r--compiler/GHC/Tc/Utils/Zonk.hs36
1 files changed, 0 insertions, 36 deletions
diff --git a/compiler/GHC/Tc/Utils/Zonk.hs b/compiler/GHC/Tc/Utils/Zonk.hs
index eee43e8ed1..6fa47f8b64 100644
--- a/compiler/GHC/Tc/Utils/Zonk.hs
+++ b/compiler/GHC/Tc/Utils/Zonk.hs
@@ -857,32 +857,6 @@ zonkExpr env expr@(RecordCon { rcon_ext = con_expr, rcon_flds = rbinds })
; return (expr { rcon_ext = new_con_expr
, rcon_flds = new_rbinds }) }
--- Record updates via dot syntax are replaced by desugared expressions
--- in the renamer. See Note [Rebindable syntax and HsExpansion]. This
--- is why we match on 'rupd_flds = Left rbinds' here and panic otherwise.
-zonkExpr env (RecordUpd { rupd_flds = Left rbinds
- , rupd_expr = expr
- , rupd_ext = RecordUpdTc {
- rupd_cons = cons
- , rupd_in_tys = in_tys
- , rupd_out_tys = out_tys
- , rupd_wrap = req_wrap }})
- = do { new_expr <- zonkLExpr env expr
- ; new_in_tys <- mapM (zonkTcTypeToTypeX env) in_tys
- ; new_out_tys <- mapM (zonkTcTypeToTypeX env) out_tys
- ; new_rbinds <- zonkRecUpdFields env rbinds
- ; (_, new_recwrap) <- zonkCoFn env req_wrap
- ; return (
- RecordUpd {
- rupd_expr = new_expr
- , rupd_flds = Left new_rbinds
- , rupd_ext = RecordUpdTc {
- rupd_cons = cons
- , rupd_in_tys = new_in_tys
- , rupd_out_tys = new_out_tys
- , rupd_wrap = new_recwrap }}) }
-zonkExpr _ (RecordUpd {}) = panic "GHC.Tc.Utils.Zonk: zonkExpr: The impossible happened!"
-
zonkExpr env (ExprWithTySig _ e ty)
= do { e' <- zonkLExpr env e
; return (ExprWithTySig noExtField e' ty) }
@@ -1309,16 +1283,6 @@ zonkRecFields env (HsRecFields flds dd)
; return (L l (fld { hfbLHS = new_id
, hfbRHS = new_expr })) }
-zonkRecUpdFields :: ZonkEnv -> [LHsRecUpdField GhcTc]
- -> TcM [LHsRecUpdField GhcTc]
-zonkRecUpdFields env = mapM zonk_rbind
- where
- zonk_rbind (L l fld)
- = do { new_id <- wrapLocMA (zonkFieldOcc env) (hsRecUpdFieldOcc fld)
- ; new_expr <- zonkLExpr env (hfbRHS fld)
- ; return (L l (fld { hfbLHS = fmap ambiguousFieldOcc new_id
- , hfbRHS = new_expr })) }
-
{-
************************************************************************
* *