[commit: ghc] master: API Annotations: use AnnValue for (~) (fd686c4)

git at git.haskell.org git at git.haskell.org
Thu Jan 14 18:51:39 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/fd686c43c45b68fec97ae4c45709358798af6121/ghc

>---------------------------------------------------------------

commit fd686c43c45b68fec97ae4c45709358798af6121
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Thu Jan 14 20:46:35 2016 +0200

    API Annotations: use AnnValue for (~)
    
    Previously oqtycon used AnnTilde for the location of the RdrName when
    parsing (~).
    
    The recent increase in '~' characters in the AST confuses
    ghc-exactprint, so this patch treats all RdrNames the same way now,
    marking the location of the core name with AnnValue.


>---------------------------------------------------------------

fd686c43c45b68fec97ae4c45709358798af6121
 compiler/parser/Parser.y | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y
index 7c9aea8..5f6f12c 100644
--- a/compiler/parser/Parser.y
+++ b/compiler/parser/Parser.y
@@ -2840,7 +2840,7 @@ oqtycon :: { Located RdrName }  -- An "ordinary" qualified tycon;
         | '(' qtyconsym ')'             {% ams (sLL $1 $> (unLoc $2))
                                                [mop $1,mj AnnVal $2,mcp $3] }
         | '(' '~' ')'                   {% ams (sLL $1 $> $ eqTyCon_RDR)
-                                               [mop $1,mj AnnTilde $2,mcp $3] }
+                                               [mop $1,mj AnnVal $2,mcp $3] }
 
 oqtycon_no_varcon :: { Located RdrName }  -- Type constructor which cannot be mistaken
                                           -- for variable constructor in export lists



More information about the ghc-commits mailing list