summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2017-02-24 18:57:51 +0200
committerAlan Zimmerman <alan.zimm@gmail.com>2017-02-24 18:59:26 +0200
commit9b859ef0077972e8e37e29c546bf587fd9f65e4c (patch)
treeb5890f87798ddfc5ac5c0c3f8707648cf3a9b7f9
parent67c2e076c615acc91250e50fbb5f8c24961d4d9e (diff)
downloadhaskell-9b859ef0077972e8e37e29c546bf587fd9f65e4c.tar.gz
Make SCCFunSig tag Located for ghc-exactprint
-rw-r--r--compiler/hsSyn/HsBinds.hs2
-rw-r--r--compiler/parser/Parser.y2
-rw-r--r--compiler/typecheck/TcBinds.hs2
3 files changed, 3 insertions, 3 deletions
diff --git a/compiler/hsSyn/HsBinds.hs b/compiler/hsSyn/HsBinds.hs
index 1f38c387df..d9850824c6 100644
--- a/compiler/hsSyn/HsBinds.hs
+++ b/compiler/hsSyn/HsBinds.hs
@@ -852,7 +852,7 @@ data Sig name
| SCCFunSig SourceText -- Note [Pragma source text] in BasicTypes
(Located name) -- Function name
- (Maybe StringLiteral)
+ (Maybe (Located StringLiteral))
| CompleteMatchSig SourceText (Located [Located name]) (Maybe (Located name))
deriving instance (DataId name) => Data (Sig name)
diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y
index 92e32322b1..c6a8e48c77 100644
--- a/compiler/parser/Parser.y
+++ b/compiler/parser/Parser.y
@@ -2275,7 +2275,7 @@ sigdecl :: { LHsDecl RdrName }
| '{-# SCC' qvar STRING '#-}'
{% do { scc <- getSCC $3
; let str_lit = StringLiteral (getSTRINGs $3) scc
- ; ams (sLL $1 $> (SigD (SCCFunSig (getSCC_PRAGs $1) $2 (Just str_lit))))
+ ; ams (sLL $1 $> (SigD (SCCFunSig (getSCC_PRAGs $1) $2 (Just ( sL1 $3 str_lit)))))
[mo $1, mc $4] } }
| '{-# SPECIALISE' activation qvar '::' sigtypes1 '#-}'
diff --git a/compiler/typecheck/TcBinds.hs b/compiler/typecheck/TcBinds.hs
index 25c40618f2..5586abe290 100644
--- a/compiler/typecheck/TcBinds.hs
+++ b/compiler/typecheck/TcBinds.hs
@@ -727,7 +727,7 @@ funBindTicks loc fun_id mod sigs
-- by the renamer
, let cc_str
| Just cc_str <- mb_cc_str
- = sl_fs cc_str
+ = sl_fs $ unLoc cc_str
| otherwise
= getOccFS (Var.varName fun_id)
cc_name = moduleNameFS (moduleName mod) `appendFS` consFS '.' cc_str