summaryrefslogtreecommitdiff
path: root/compiler/Language/Haskell
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2022-03-19 15:32:20 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2022-03-19 15:35:26 +0000
commit0a34a1f3aa67f428f1770d6e96eea53ec9a198cb (patch)
tree698e7027af97f1dadaf6e05d35ec75cadddcb5eb /compiler/Language/Haskell
parent559e3d3c2a93ef32e910b845187131627554aab4 (diff)
downloadhaskell-wip/ttg-rec-improvements.tar.gz
WIP WIP WIP: Split record "field vs projection" updateswip/ttg-rec-improvements
TTG avoid panicking
Diffstat (limited to 'compiler/Language/Haskell')
-rw-r--r--compiler/Language/Haskell/Syntax/Expr.hs13
1 files changed, 10 insertions, 3 deletions
diff --git a/compiler/Language/Haskell/Syntax/Expr.hs b/compiler/Language/Haskell/Syntax/Expr.hs
index 748ea4ebed..878499a1a1 100644
--- a/compiler/Language/Haskell/Syntax/Expr.hs
+++ b/compiler/Language/Haskell/Syntax/Expr.hs
@@ -486,11 +486,18 @@ data HsExpr p
-- 'GHC.Parser.Annotation.AnnClose' @'}'@
-- For details on above see Note [exact print annotations] in GHC.Parser.Annotation
- | RecordUpd
- { rupd_ext :: XRecordUpd p
+ | RecordUpdField
+ { rupd_ext :: XRecordUpdField p
, rupd_expr :: LHsExpr p
- , rupd_flds :: Either [LHsRecUpdField p] [LHsRecUpdProj p]
+ , rupd_flds :: [LHsRecUpdField p]
}
+
+ | RecordUpdProj
+ { rupd_ext :: XRecordUpdProj p
+ , rupd_expr :: LHsExpr p
+ , rupd_flds :: [LHsRecUpdProj p]
+ }
+
-- For a type family, the arg types are of the *instance* tycon,
-- not the family tycon