[commit: ghc] ghc-8.0: API Annotations: use AnnValue for (~) (b018abe)

git at git.haskell.org git at git.haskell.org
Sat Jan 16 12:48:41 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/b018abe61c1fa0f8885296597b87fd40cddcc3f2/ghc

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

commit b018abe61c1fa0f8885296597b87fd40cddcc3f2
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.
    
    (cherry picked from commit fd686c43c45b68fec97ae4c45709358798af6121)


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

b018abe61c1fa0f8885296597b87fd40cddcc3f2
 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 4732956..83b63ae 100644
--- a/compiler/parser/Parser.y
+++ b/compiler/parser/Parser.y
@@ -2841,7 +2841,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