Provide a utility to check API Annotations
authorAlan Zimmerman <alan.zimm@gmail.com>
Sun, 25 Oct 2015 19:19:38 +0000 (20:19 +0100)
committerBen Gamari <ben@smart-cactus.org>
Sun, 25 Oct 2015 19:19:38 +0000 (20:19 +0100)
commit43751b2436f370d956d8021b3cdd3eb77801470b
treec3eb56f9cd6f34bcc3ede20bb9b196fc140aa10a
parent898f34cdd0121d6bc145f75af2cf99f58542b558
Provide a utility to check API Annotations

It is difficult for GHC developers to know if they have broken the API
Annotations.

This patch provides a utility that can be used as a test to show up
errors in the API Annotations.

It is based on the current tests for ghc-api/annotations which can parse
a file using the just-built GHC API, and check that no annotations are
disconnected from the ParsedSource in the output.

In addition, it should be able to dump the annotations to a file, so a
new feature developer can check that all changes to the parser do
provide annotations.

Trac ticket: #10917

Test Plan: ./validate

Reviewers: hvr, thomie, austin, bgamari

Reviewed By: bgamari

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

GHC Trac Issues: #10917
22 files changed:
ghc.mk
testsuite/mk/boilerplate.mk
testsuite/tests/ghc-api/annotations/Makefile
testsuite/tests/ghc-api/annotations/boolFormula.hs [deleted file]
testsuite/tests/ghc-api/annotations/exampleTest.hs [deleted file]
testsuite/tests/ghc-api/annotations/t10255.hs [deleted file]
testsuite/tests/ghc-api/annotations/t10268.hs [deleted file]
testsuite/tests/ghc-api/annotations/t10269.hs [deleted file]
testsuite/tests/ghc-api/annotations/t10278.hs [deleted file]
testsuite/tests/ghc-api/annotations/t10280.hs [deleted file]
testsuite/tests/ghc-api/annotations/t10307.hs [deleted file]
testsuite/tests/ghc-api/annotations/t10309.hs [deleted file]
testsuite/tests/ghc-api/annotations/t10312.hs [deleted file]
testsuite/tests/ghc-api/annotations/t10354.hs [deleted file]
testsuite/tests/ghc-api/annotations/t10357.hs [deleted file]
testsuite/tests/ghc-api/annotations/t10358.hs [deleted file]
testsuite/tests/ghc-api/annotations/t10396.hs [deleted file]
testsuite/tests/ghc-api/annotations/t10399.hs [deleted file]
utils/check-api-annotations/Main.hs [new file with mode: 0644]
utils/check-api-annotations/README [new file with mode: 0644]
utils/check-api-annotations/check-api-annotations.cabal [new file with mode: 0644]
utils/check-api-annotations/ghc.mk [new file with mode: 0644]