diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2015-11-22 23:41:57 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-11-23 00:07:43 +0100 |
commit | 3df9563e590bbfbfe1bc9171a0e8fc93ceef690d (patch) | |
tree | 5e63328de5de41c66f089284d75e7251c4085db1 /compiler/hsSyn/PlaceHolder.hs | |
parent | 64737f2dfa0ff9ca4f4c056143b3591cedd32652 (diff) | |
download | haskell-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/hsSyn/PlaceHolder.hs')
-rw-r--r-- | compiler/hsSyn/PlaceHolder.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/hsSyn/PlaceHolder.hs b/compiler/hsSyn/PlaceHolder.hs index d9ec5b2912..97a4d7c620 100644 --- a/compiler/hsSyn/PlaceHolder.hs +++ b/compiler/hsSyn/PlaceHolder.hs @@ -17,6 +17,7 @@ import Coercion import {-# SOURCE #-} ConLike (ConLike) import TcEvidence (HsWrapper) import FieldLabel +import SrcLoc (Located) import Data.Data hiding ( Fixity ) import BasicTypes (Fixity) @@ -103,6 +104,7 @@ type DataId id = , Data (PostRn id Fixity) , Data (PostRn id Bool) , Data (PostRn id Name) + , Data (PostRn id (Located Name)) , Data (PostRn id [Name]) -- , Data (PostRn id [id]) , Data (PostRn id id) |