Can somebody please add a couple of tests to our pretty-printer?
We can check that parser and pretty printer are in sync by testing the round trip property via test case generation. An easy to check property would be something like:
\x -> print (parse (print x)) == print x
But it would be better to check equivalence of ASTs some other way then printing both, maybe by adding a identicalTerm function`? Then we could have the following property:
@Blaisorblade proposes in https://github.com/Toxaris/pts/issues/33#issuecomment-14663123:
We can check that parser and pretty printer are in sync by testing the round trip property via test case generation. An easy to check property would be something like:
But it would be better to check equivalence of ASTs some other way then printing both, maybe by adding a
identicalTerm
function`? Then we could have the following property: