summaryrefslogtreecommitdiff
path: root/compiler/GHC/Hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2022-06-22 21:09:22 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-07-06 13:50:27 -0400
commitc5415bc5c428df72f3943fd9bf117355ae746fdb (patch)
tree77815ece007b099a96aa55b3e898cf4d99b58d6a /compiler/GHC/Hs
parentfd379d1b8e709f4eaa20a969bf9fffd40b8a4433 (diff)
downloadhaskell-c5415bc5c428df72f3943fd9bf117355ae746fdb.tar.gz
Fix exact printing of the HsRule name
Prior to this branch, the HsRule name was XRec pass (SourceText,RuleName) and there is an ExactPrint instance for (SourceText, RuleName). The SourceText has moved to a different location, so synthesise the original to trigger the correct instance when printing. We need both the SourceText and RuleName when exact printing, as it is possible to have a NoSourceText variant, in which case we fall back to the FastString.
Diffstat (limited to 'compiler/GHC/Hs')
-rw-r--r--compiler/GHC/Hs/Decls.hs2
1 files changed, 0 insertions, 2 deletions
diff --git a/compiler/GHC/Hs/Decls.hs b/compiler/GHC/Hs/Decls.hs
index 9264d6c7c2..8bb7834f3b 100644
--- a/compiler/GHC/Hs/Decls.hs
+++ b/compiler/GHC/Hs/Decls.hs
@@ -1122,8 +1122,6 @@ data HsRuleRn = HsRuleRn NameSet NameSet -- Free-vars from the LHS and RHS
type instance XXRuleDecl (GhcPass _) = DataConCantHappen
-type instance Anno (SourceText, RuleName) = SrcAnn NoEpAnns
-
data HsRuleAnn
= HsRuleAnn
{ ra_tyanns :: Maybe (AddEpAnn, AddEpAnn)