summaryrefslogtreecommitdiff
path: root/compiler/hsSyn
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2018-08-27 14:02:42 +0200
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>2018-08-27 14:02:42 +0200
commit5e6cf2a9301a5473ff9c5319b96de941b1ad72dd (patch)
tree78e37421b84d14b96af5371d33ba94b4de10626e /compiler/hsSyn
parentc523525b0e434d848f6e47ea3f9a37485965fa79 (diff)
downloadhaskell-5e6cf2a9301a5473ff9c5319b96de941b1ad72dd.tar.gz
Fix #15550 by quoting RULE names during TH conversion
Summary: When converting a `RuleP` to a GHC source `RuleD` during TH conversion, we were stupidly not double-quoting the name of the rule. Easily fixed. Test Plan: make test TEST=T15550 Reviewers: goldfire, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, carter GHC Trac Issues: #15550 Differential Revision: https://phabricator.haskell.org/D5090
Diffstat (limited to 'compiler/hsSyn')
-rw-r--r--compiler/hsSyn/Convert.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/hsSyn/Convert.hs b/compiler/hsSyn/Convert.hs
index 24b0b20d80..687c828fef 100644
--- a/compiler/hsSyn/Convert.hs
+++ b/compiler/hsSyn/Convert.hs
@@ -705,8 +705,8 @@ cvtPragmaD (RuleP nm bndrs lhs rhs phases)
; rhs' <- cvtl rhs
; returnJustL $ Hs.RuleD noExt
$ HsRules noExt (SourceText "{-# RULES")
- [noLoc $ HsRule noExt (noLoc (SourceText nm,nm')) act
- bndrs' lhs' rhs']
+ [noLoc $ HsRule noExt (noLoc (quotedSourceText nm,nm'))
+ act bndrs' lhs' rhs']
}
cvtPragmaD (AnnP target exp)