ApiAnnotations: misplaced AnnComma for squals production
authorAlan Zimmerman <alan.zimm@gmail.com>
Fri, 8 May 2015 09:18:28 +0000 (11:18 +0200)
committerAlan Zimmerman <alan.zimm@gmail.com>
Fri, 8 May 2015 09:18:28 +0000 (11:18 +0200)
commit713612674634754edd17264e688f0479d943d8d2
treebaf1cd15eaee57a328494cf24fba0613f802d3f6
parent225df19a87d8de8245db84d558618f4824631acc
ApiAnnotations: misplaced AnnComma for squals production

Summary:
The parser production for squals has

    : squals ',' transformqual
             {% addAnnotation (gl $ last $ unLoc $1) AnnComma (gl $2) >>
                ams (sLL $1 $> ()) (fst $ unLoc $3) >>
                return (sLL $1 $> [sLL $1 $> ((snd $ unLoc $3) (reverse (unLoc $1)))]) }

This attaches the comma to the wrong part of the squals, as it is
generated in reverse order.

Test Plan: ./validate

Reviewers: hvr, austin

Reviewed By: austin

Subscribers: bgamari, thomie, mpickering

Differential Revision: https://phabricator.haskell.org/D846

GHC Trac Issues: #10312
compiler/parser/Parser.y
testsuite/tests/ghc-api/annotations/.gitignore
testsuite/tests/ghc-api/annotations/Makefile
testsuite/tests/ghc-api/annotations/T10312.stderr [new file with mode: 0644]
testsuite/tests/ghc-api/annotations/T10312.stdout [new file with mode: 0644]
testsuite/tests/ghc-api/annotations/Test10312.hs [new file with mode: 0644]
testsuite/tests/ghc-api/annotations/all.T
testsuite/tests/ghc-api/annotations/t10312.hs [new file with mode: 0644]