diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2018-06-22 21:32:19 +0200 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2018-06-22 21:34:54 +0200 |
commit | 5f06cf6b6199c8f0e4921f4126f6eb15e2ff18ac (patch) | |
tree | a307050beac702489d50804be0d0f784769a5e8d /compiler/hsSyn | |
parent | 122ba98af22c2b016561433dfa55bbabba98d972 (diff) | |
download | haskell-5f06cf6b6199c8f0e4921f4126f6eb15e2ff18ac.tar.gz |
TTG for IPBind had wrong extension name
The standard[1] for extension naming is to use the XC prefix for the
internal extension points, rather than for a new constructor.
This is violated for IPBind, having
data IPBind id
= IPBind
(XIPBind id)
(Either (Located HsIPName) (IdP id))
(LHsExpr id)
| XCIPBind (XXIPBind id)
Swap the usage of XIPBind and XCIPBind
[1] https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow#Namingconventions
Closes #15302
Diffstat (limited to 'compiler/hsSyn')
-rw-r--r-- | compiler/hsSyn/HsBinds.hs | 8 | ||||
-rw-r--r-- | compiler/hsSyn/HsExtension.hs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/compiler/hsSyn/HsBinds.hs b/compiler/hsSyn/HsBinds.hs index e4a6906996..98f503b0d9 100644 --- a/compiler/hsSyn/HsBinds.hs +++ b/compiler/hsSyn/HsBinds.hs @@ -859,12 +859,12 @@ type LIPBind id = Located (IPBind id) -- For details on above see note [Api annotations] in ApiAnnotation data IPBind id = IPBind - (XIPBind id) + (XCIPBind id) (Either (Located HsIPName) (IdP id)) (LHsExpr id) - | XCIPBind (XXIPBind id) + | XIPBind (XXIPBind id) -type instance XIPBind (GhcPass p) = NoExt +type instance XCIPBind (GhcPass p) = NoExt type instance XXIPBind (GhcPass p) = NoExt instance (p ~ GhcPass pass, OutputableBndrId p) @@ -878,7 +878,7 @@ instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (IPBind p) where where name = case lr of Left (L _ ip) -> pprBndr LetBind ip Right id -> pprBndr LetBind id - ppr (XCIPBind x) = ppr x + ppr (XIPBind x) = ppr x {- ************************************************************************ diff --git a/compiler/hsSyn/HsExtension.hs b/compiler/hsSyn/HsExtension.hs index 52e19b96f3..a23b973b79 100644 --- a/compiler/hsSyn/HsExtension.hs +++ b/compiler/hsSyn/HsExtension.hs @@ -156,11 +156,11 @@ type ForallXHsIPBinds (c :: * -> Constraint) (x :: *) = ) -- IPBind type families -type family XIPBind x +type family XCIPBind x type family XXIPBind x type ForallXIPBind (c :: * -> Constraint) (x :: *) = - ( c (XIPBind x) + ( c (XCIPBind x) , c (XXIPBind x) ) |