summaryrefslogtreecommitdiff
path: root/compiler/deSugar/DsExpr.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2015-11-07 23:46:03 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2015-11-07 23:46:41 +0000
commit22080113f02f6644e2a0e3ce8adb1502346ab3b4 (patch)
tree34b6f17711855e9ddf93c13b6f06840e2b0915b9 /compiler/deSugar/DsExpr.hs
parentbe8858570274821546ccabf75fe01c3dad80e337 (diff)
downloadhaskell-22080113f02f6644e2a0e3ce8adb1502346ab3b4.tar.gz
Remove PatSynBuilderId
Summary: It was only used to pass field labels between the typechecker and desugarer. Instead we add an extra field the RecordCon to carry this information. Reviewers: austin, goldfire, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1443 GHC Trac Issues: #11057
Diffstat (limited to 'compiler/deSugar/DsExpr.hs')
-rw-r--r--compiler/deSugar/DsExpr.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/deSugar/DsExpr.hs b/compiler/deSugar/DsExpr.hs
index 2f7ebd85c0..075a647588 100644
--- a/compiler/deSugar/DsExpr.hs
+++ b/compiler/deSugar/DsExpr.hs
@@ -493,7 +493,7 @@ We also handle @C{}@ as valid construction syntax for an unlabelled
constructor @C@, setting all of @C@'s fields to bottom.
-}
-dsExpr (RecordCon (L _ con_like_id) con_expr rbinds) = do
+dsExpr (RecordCon _ con_expr rbinds labels) = do
con_expr' <- dsExpr con_expr
let
(arg_tys, _) = tcSplitFunTys (exprType con_expr')
@@ -507,8 +507,6 @@ dsExpr (RecordCon (L _ con_like_id) con_expr rbinds) = do
[] -> mkErrorAppDs rEC_CON_ERROR_ID arg_ty (ppr (flLabel fl))
unlabelled_bottom arg_ty = mkErrorAppDs rEC_CON_ERROR_ID arg_ty Outputable.empty
- labels = conLikeFieldLabels (idConLike con_like_id)
- -- The data_con_id is guaranteed to be the wrapper id of the constructor
con_args <- if null labels
then mapM unlabelled_bottom arg_tys