Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert jvm-parser to use prettyprinter library #951

Closed
brianhuffman opened this issue Dec 4, 2020 · 1 comment · Fixed by #1059
Closed

Convert jvm-parser to use prettyprinter library #951

brianhuffman opened this issue Dec 4, 2020 · 1 comment · Fixed by #1059
Labels
tech debt Issues that document or involve technical debt

Comments

@brianhuffman
Copy link
Contributor

With PR #931, most packages in the SAW ecosystem will have standardized on the modern prettyprinter library for pretty printing. Everything that was previously using ansi-wl-pprint has been ported to prettyprinter. However, there are still some submodules that use the old Text.PrettyPrint.HughesPJ library (from package pretty) for pretty printing, including jvm-parser.

Text.PrettyPrint.HughesPJ is not so similar to prettyprinter as ansl-wl-pprint is, so it will be a bit more work to convert. But when we do, we can avoid the "icky" conversions from Doc to String to other Doc type that we see in modules like SAWScript.JavaPretty:

[ text (show (ppType (fieldType f))) -- TODO: Ick. Different PPs.

prettyType = text . show . ppType -- TODO: Ick.

@brianhuffman brianhuffman added the tech debt Issues that document or involve technical debt label Dec 4, 2020
@brianhuffman
Copy link
Contributor Author

Packages llvm-pretty and cryptol also use the HughesPJ pretty library, and should probably be ported to prettyprinter as well, for the same reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech debt Issues that document or involve technical debt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant