diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2020-07-30 10:22:48 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-08-02 16:44:11 -0400 |
commit | 226417424b2b578fd3c5424588367cb24e7720eb (patch) | |
tree | 031e3f130324e1b24ee863bf1aaef471698ce2f7 /compiler/GHC/Hs/Utils.hs | |
parent | e30fed6c6de1f881ce313900274294a793e42677 (diff) | |
download | haskell-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.hs | 10 |
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) |