[commit: ghc] master: APIAnnotations:AnnComma in wrong place in qcnames1 (721d56d)

git at git.haskell.org git at git.haskell.org
Tue Dec 22 19:37:46 UTC 2015


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

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

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

commit 721d56d596848f9c772d08ef8693dff8ab9417b6
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Tue Dec 22 21:03:58 2015 +0200

    APIAnnotations:AnnComma in wrong place in qcnames1
    
    The list is reversed when it is used, so the comma must be added to the
    item at the front of it, to be following it when used.


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

721d56d596848f9c772d08ef8693dff8ab9417b6
 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 777bae0..ead81ac 100644
--- a/compiler/parser/Parser.y
+++ b/compiler/parser/Parser.y
@@ -653,7 +653,7 @@ qcnames1 :: { ([AddAnn], [Located (Maybe RdrName)]) }     -- A reversed list
                                                     l@(L _ Nothing) ->
                                                       return ([mj AnnComma $2, mj AnnDotdot l]
                                                               ,($3  : snd $1))
-                                                    l -> (aa l (AnnComma, $2) >>
+                                                    l -> (aa (head (snd $1)) (AnnComma, $2) >>
                                                           return (fst $1, $3 : snd $1)) }
 
 



More information about the ghc-commits mailing list