summaryrefslogtreecommitdiff
path: root/utils/check-ppr/README
diff options
context:
space:
mode:
Diffstat (limited to 'utils/check-ppr/README')
-rw-r--r--utils/check-ppr/README20
1 files changed, 20 insertions, 0 deletions
diff --git a/utils/check-ppr/README b/utils/check-ppr/README
new file mode 100644
index 0000000000..ac0eb55977
--- /dev/null
+++ b/utils/check-ppr/README
@@ -0,0 +1,20 @@
+
+This programme is intended to be used by any GHC developers working on the AST
+and/or pretty printer by providing a way to check that the same AST is generated
+from the pretty printed AST as from the original source.
+
+i.e., it checks whether
+
+ parse (ppr (parse s)) === parse s
+
+
+This utility is also intended to be used in tests, so that when new features are
+added the ability to round-trip the AST via ppr is tested.
+
+Usage
+
+In a test Makefile
+
+ $(CHECK_PPR) "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" FileToParse.hs
+
+See examples in (REPO_HOME)/testsuite/tests/printer/Makefile