summaryrefslogtreecommitdiff
path: root/compiler/GHC/Hs/Utils.hs
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2020-07-30 10:22:48 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-08-02 16:44:11 -0400
commit226417424b2b578fd3c5424588367cb24e7720eb (patch)
tree031e3f130324e1b24ee863bf1aaef471698ce2f7 /compiler/GHC/Hs/Utils.hs
parente30fed6c6de1f881ce313900274294a793e42677 (diff)
downloadhaskell-226417424b2b578fd3c5424588367cb24e7720eb.tar.gz
Remove ConDeclGADTPrefixPs
This removes the `ConDeclGADTPrefixPs` per the discussion in #18517. Most of this patch simply removes code, although the code in the `rnConDecl` case for `ConDeclGADTPrefixPs` had to be moved around a bit: * The nested `forall`s check now lives in the `rnConDecl` case for `ConDeclGADT`. * The `LinearTypes`-specific code that used to live in the `rnConDecl` case for `ConDeclGADTPrefixPs` now lives in `GHC.Parser.PostProcess.mkGadtDecl`, which is now monadic so that it can check if `-XLinearTypes` is enabled. Fixes #18157.
Diffstat (limited to 'compiler/GHC/Hs/Utils.hs')
-rw-r--r--compiler/GHC/Hs/Utils.hs10
1 files changed, 0 insertions, 10 deletions
diff --git a/compiler/GHC/Hs/Utils.hs b/compiler/GHC/Hs/Utils.hs
index 1af11138b9..04554ef2f9 100644
--- a/compiler/GHC/Hs/Utils.hs
+++ b/compiler/GHC/Hs/Utils.hs
@@ -1265,16 +1265,6 @@ hsConDeclsBinders cons
(remSeen', flds) = get_flds remSeen args
(ns, fs) = go remSeen' rs
- XConDecl x -> case ghcPass @p of
- GhcPs | ConDeclGADTPrefixPs { con_gp_names = names } <- x
- -> (map (L loc . unLoc) names ++ ns, fs)
-#if __GLASGOW_HASKELL__ < 811
- GhcRn -> noExtCon x
- GhcTc -> noExtCon x
-#endif
- where
- (ns, fs) = go remSeen rs
-
get_flds :: Seen p -> HsConDeclDetails (GhcPass p)
-> (Seen p, [LFieldOcc (GhcPass p)])
get_flds remSeen (RecCon flds)