summaryrefslogtreecommitdiff
path: root/compiler/rename/RnSplice.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2015-11-22 23:41:57 +0100
committerBen Gamari <ben@smart-cactus.org>2015-11-23 00:07:43 +0100
commit3df9563e590bbfbfe1bc9171a0e8fc93ceef690d (patch)
tree5e63328de5de41c66f089284d75e7251c4085db1 /compiler/rename/RnSplice.hs
parent64737f2dfa0ff9ca4f4c056143b3591cedd32652 (diff)
downloadhaskell-3df9563e590bbfbfe1bc9171a0e8fc93ceef690d.tar.gz
ApiAnnotations: Make all RdrName occurences Located
At the moment the API Annotations can only be used on the ParsedSource, as there are changes made to the RenamedSource that prevent it from being used to round trip source code. It is possible to build a map from every Located Name in the RenamedSource from its location to the Name, which can then be used when resolved names are required when changing the ParsedSource. However, there are instances where the identifier is not located, specifically (GHC.VarPat name) (GHC.HsVar name) (GHC.UserTyVar name) (GHC.HsTyVar name) Replace each of the name types above with (Located name) Updates the haddock submodule. Test Plan: ./validate Reviewers: austin, goldfire, bgamari Reviewed By: bgamari Subscribers: goldfire, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D1512 GHC Trac Issues: #11019
Diffstat (limited to 'compiler/rename/RnSplice.hs')
-rw-r--r--compiler/rename/RnSplice.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rename/RnSplice.hs b/compiler/rename/RnSplice.hs
index b78d4c7aa9..8d570ea3b7 100644
--- a/compiler/rename/RnSplice.hs
+++ b/compiler/rename/RnSplice.hs
@@ -338,10 +338,11 @@ mkQuasiQuoteExpr :: UntypedSpliceFlavour -> Name -> SrcSpan -> FastString -> LHs
-- which is what we must run in a quasi-quote
mkQuasiQuoteExpr flavour quoter q_span quote
= L q_span $ HsApp (L q_span $
- HsApp (L q_span (HsVar quote_selector)) quoterExpr)
+ HsApp (L q_span (HsVar (L q_span quote_selector)))
+ quoterExpr)
quoteExpr
where
- quoterExpr = L q_span $! HsVar $! quoter
+ quoterExpr = L q_span $! HsVar $! (L q_span quoter)
quoteExpr = L q_span $! HsLit $! HsString "" quote
quote_selector = case flavour of
UntypedExpSplice -> quoteExpName