APIAnnotations:AnnComma in wrong place in qcnames1
authorAlan Zimmerman <alan.zimm@gmail.com>
Tue, 22 Dec 2015 19:03:58 +0000 (21:03 +0200)
committerAlan Zimmerman <alan.zimm@gmail.com>
Tue, 22 Dec 2015 19:38:19 +0000 (21:38 +0200)
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.

compiler/parser/Parser.y

index 777bae0..ead81ac 100644 (file)
@@ -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)) }