
Rendell and Ostermann, Invertible syntax descriptions, Haskell Symposium '10 https://doi.org/10.1145/1863523.1863525 https://hackage.haskell.org/package/invertible-syntax Hi. Thanks a lot for answer.
This package does not build with ghc 8.8.4, because it did not implemented MonadFail proposal. This shows that (unfortunately) nobody cares that reversible parsing actually works. But I was able to build the package with ghc 8.0.1. I tried to break the package, i. e. I tried to create grammar such that parsing and printing will not match. I was unable to do this, so it seems the package really guarantees reversible parsing. It seems I overlooked it when I searched Hackage. I will probably use this package. But it doesn't check grammars for ambiguity. I will probably use this package together with my brute force algorithm.
Perhaps you don't even need to pretty-print? I need printing.
== Askar Safin https://github.com/safinaskar