API Annotations: AnnTilde missing
authorAlan Zimmerman <alan.zimm@gmail.com>
Fri, 1 Jan 2016 16:59:52 +0000 (18:59 +0200)
committerBen Gamari <ben@smart-cactus.org>
Fri, 1 Jan 2016 19:29:39 +0000 (20:29 +0100)
commit0392a237097ff0a271e424a40426c74f51a6f676
tree7d1152820a65ad94779765f467c7229519f75e86
parentb48274522b2e0a8fd8c31db42a49777386dffdd7
API Annotations: AnnTilde missing

In T10689a.hs, the fragment

    data instance Sing (z :: [a])
      = z ~ '[] =>
        SNil
      | forall (m :: a)
               (n :: [a]). z ~ (:) m n =>
        SCons (Sing m) (Sing n)

ends up with the AnnTilde annotations for the two tildes not attached to
the final AST.

This patch moves the AnnTilde to the right place.

Closes #11321

(cherry picked from commit 0b8dc7d4d5b26e184a7698e22f9fe7d8ee3c90d4)
compiler/parser/Lexer.x
compiler/parser/Parser.y
compiler/parser/RdrHsSyn.hs
testsuite/tests/ghc-api/annotations/Makefile
testsuite/tests/ghc-api/annotations/T11321.stderr [new file with mode: 0644]
testsuite/tests/ghc-api/annotations/T11321.stdout [new file with mode: 0644]
testsuite/tests/ghc-api/annotations/Test11321.hs [new file with mode: 0644]
testsuite/tests/ghc-api/annotations/all.T