summaryrefslogtreecommitdiff
path: root/compiler/GHC/Hs/Pat.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2020-08-24 09:37:21 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-08-25 07:38:16 -0400
commitfb77207a23deade8e3f8598c34598535711264cc (patch)
tree69d735724ad944c454eee0c0f532304c041fabc2 /compiler/GHC/Hs/Pat.hs
parentdb8793ad417ebfcb57d42e8111674a90706a7918 (diff)
downloadhaskell-fb77207a23deade8e3f8598c34598535711264cc.tar.gz
Use LIdP rather than (XRec p (IdP p))
This patch mainly just replaces use of XRec p (IdP p) with LIdP p One slightly more significant change is to parameterise HsPatSynDetails over the pass rather than the argument type, so that it's uniform with HsConDeclDetails and HsConPatDetails. I also got rid of the dead code GHC.Hs.type.conDetailsArgs But this is all just minor refactoring. No change in functionality.
Diffstat (limited to 'compiler/GHC/Hs/Pat.hs')
-rw-r--r--compiler/GHC/Hs/Pat.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/GHC/Hs/Pat.hs b/compiler/GHC/Hs/Pat.hs
index 1bf9715d18..62de0ab182 100644
--- a/compiler/GHC/Hs/Pat.hs
+++ b/compiler/GHC/Hs/Pat.hs
@@ -93,7 +93,7 @@ data Pat p
-- AZ:TODO above comment needs to be updated
| VarPat (XVarPat p)
- (XRec p (IdP p)) -- ^ Variable Pattern
+ (LIdP p) -- ^ Variable Pattern
-- See Note [Located RdrNames] in GHC.Hs.Expr
| LazyPat (XLazyPat p)
@@ -103,7 +103,7 @@ data Pat p
-- For details on above see note [Api annotations] in GHC.Parser.Annotation
| AsPat (XAsPat p)
- (XRec p (IdP p)) (LPat p) -- ^ As pattern
+ (LIdP p) (LPat p) -- ^ As pattern
-- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnAt'
-- For details on above see note [Api annotations] in GHC.Parser.Annotation
@@ -224,7 +224,7 @@ data Pat p
-- For details on above see note [Api annotations] in GHC.Parser.Annotation
| NPlusKPat (XNPlusKPat p) -- Type of overall pattern
- (XRec p (IdP p)) -- n+k pattern
+ (LIdP p) -- n+k pattern
(XRec p (HsOverLit p)) -- It'll always be an HsIntegral
(HsOverLit p) -- See Note [NPlusK patterns] in GHC.Tc.Gen.Pat
-- NB: This could be (PostTc ...), but that induced a
@@ -313,7 +313,7 @@ type instance XXPat GhcTc = CoPat
type family ConLikeP x
type instance ConLikeP GhcPs = RdrName -- IdP GhcPs
-type instance ConLikeP GhcRn = Name -- IdP GhcRn
+type instance ConLikeP GhcRn = Name -- IdP GhcRn
type instance ConLikeP GhcTc = ConLike
-- ---------------------------------------------------------------------