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

Switch from ansi-wl-pprint to the prettyprinter package. #77

Merged
merged 5 commits into from
Dec 1, 2020

Conversation

brianhuffman
Copy link
Contributor

This patch converts packages what4, what4-abc, and what4-blt.

(Note: I wasn't able to compile what4-blt locally, so I will need to rely on CI to see that I modified it correctly.)

@brianhuffman
Copy link
Contributor Author

The CI says I introduced an ambiguous type in a call to opt in what4-blt. I'll force-push and try again.

This patch converts packages `what4`, `what4-abc`, and `what4-blt`.
We prefer the `viaShow` function from `Prettyprinter`, so that
it is easier to find and replace such usages when types gain
proper `Pretty` class instances in the future.
Copy link
Member

@kquick kquick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple of comments on various areas to check on before merging this.

what4/src/What4/Config.hs Outdated Show resolved Hide resolved
what4/src/What4/Expr/Builder.hs Show resolved Hide resolved
@@ -951,7 +951,7 @@ findExprToRemove exprs0 = go [] exprs0 Nothing
go (AppPPExpr a:prev) exprs (Just (reverse prev, a, exprs))


ppExpr' :: forall t tp s . Expr t tp -> PPExprOpts -> ST s ([Doc], PPExpr)
ppExpr' :: forall t tp s ann. Expr t tp -> PPExprOpts -> ST s ([Doc ann], PPExpr ann)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Along with the previous comment, an explicit annotation type will make it useable at rendering time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same reasoning as before; this is code that generates Docs containing no annotations, so we might as well keep them polymorphic for maximum flexibility.

what4/src/What4/Expr/MATLAB.hs Show resolved Hide resolved
what4/src/What4/Protocol/SMTLib2.hs Outdated Show resolved Hide resolved
what4/src/What4/Protocol/SMTLib2.hs Outdated Show resolved Hide resolved
Brian Huffman added 3 commits November 24, 2020 15:26
brianhuffman pushed a commit to GaloisInc/saw-script that referenced this pull request Nov 25, 2020
This commit includes the following submodule PRs:
- GaloisInc/what4#77
- GaloisInc/crucible#586
- GaloisInc/macaw#178

WARNING: Do not merge this commit into master until all of the
above PRs are merged into their respective master branches and
the submodule references of this commit can be patched up.
brianhuffman pushed a commit to GaloisInc/saw-script that referenced this pull request Nov 30, 2020
This commit includes the following submodule PRs:
- GaloisInc/what4#77
- GaloisInc/crucible#586
- GaloisInc/macaw#178

WARNING: Do not merge this commit into master until all of the
above PRs are merged into their respective master branches and
the submodule references of this commit can be patched up.
brianhuffman pushed a commit to GaloisInc/macaw that referenced this pull request Dec 1, 2020
This patch relies on the following submodule updates:
- GaloisInc/what4#77
- GaloisInc/elf-edit#20
- GaloisInc/crucible#586

This patch updates the following packages:
- macaw-base
- macaw-symbolic
- macaw-x86
- macaw-x86-symbolic
- macaw-aarch32
- macaw-ppc
- macaw-semmc
- macaw-refinement
Copy link
Member

@kquick kquick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@brianhuffman brianhuffman merged commit 3461006 into master Dec 1, 2020
brianhuffman pushed a commit to GaloisInc/saw-script that referenced this pull request Dec 1, 2020
This commit includes the following submodule PRs:
- GaloisInc/what4#77
- GaloisInc/crucible#586
- GaloisInc/macaw#178

WARNING: Do not merge this commit into master until all of the
above PRs are merged into their respective master branches and
the submodule references of this commit can be patched up.
brianhuffman pushed a commit to GaloisInc/macaw that referenced this pull request Dec 1, 2020
This patch relies on the following submodule updates:
- GaloisInc/what4#77
- GaloisInc/elf-edit#20
- GaloisInc/crucible#586

This patch updates the following packages:
- macaw-base
- macaw-symbolic
- macaw-x86
- macaw-x86-symbolic
- macaw-aarch32
- macaw-ppc
- macaw-semmc
- macaw-refinement
brianhuffman pushed a commit to GaloisInc/saw-script that referenced this pull request Dec 1, 2020
This commit includes the following submodule PRs:
- GaloisInc/what4#77
- GaloisInc/crucible#586
- GaloisInc/macaw#178

WARNING: Do not merge this commit into master until all of the
above PRs are merged into their respective master branches and
the submodule references of this commit can be patched up.
brianhuffman pushed a commit to GaloisInc/saw-script that referenced this pull request Dec 1, 2020
This commit includes the following submodule PRs:
- GaloisInc/what4#77
- GaloisInc/crucible#586
- GaloisInc/macaw#178
- GaloisInc/elf-edit#20

WARNING: Do not merge this commit into master until all of the
above PRs are merged into their respective master branches and
the submodule references of this commit can be patched up.
brianhuffman pushed a commit to GaloisInc/asl-translator that referenced this pull request Dec 2, 2020
This patch includes and adapts to the following submodule PRs:
- GaloisInc/what4#77 "prettyprinter"
- GaloisInc/crucible#586 "prettyprinter"
brianhuffman pushed a commit to GaloisInc/macaw that referenced this pull request Dec 2, 2020
This patch relies on the following submodule updates:
- GaloisInc/what4#77
- GaloisInc/elf-edit#20
- GaloisInc/crucible#586
- GaloisInc/asl-translator#28

This patch updates the following packages:
- macaw-base
- macaw-symbolic
- macaw-x86
- macaw-x86-symbolic
- macaw-aarch32
- macaw-ppc
- macaw-semmc
- macaw-refinement
brianhuffman pushed a commit to GaloisInc/macaw that referenced this pull request Dec 2, 2020
This patch relies on the following submodule updates:
- GaloisInc/what4#77
- GaloisInc/elf-edit#20
- GaloisInc/crucible#586
- GaloisInc/asl-translator#28

This patch updates the following packages:
- macaw-base
- macaw-symbolic
- macaw-x86
- macaw-x86-symbolic
- macaw-aarch32
- macaw-ppc
- macaw-semmc
- macaw-refinement
brianhuffman pushed a commit to GaloisInc/macaw that referenced this pull request Dec 2, 2020
This patch relies on the following submodule updates:
- GaloisInc/what4#77
- GaloisInc/elf-edit#20
- GaloisInc/crucible#586
- GaloisInc/asl-translator#28

This patch updates the following packages:
- macaw-base
- macaw-symbolic
- macaw-x86
- macaw-x86-symbolic
- macaw-aarch32
- macaw-ppc
- macaw-semmc
- macaw-refinement
brianhuffman pushed a commit to GaloisInc/macaw that referenced this pull request Dec 2, 2020
This patch relies on the following submodule updates:
- GaloisInc/what4#77
- GaloisInc/elf-edit#20
- GaloisInc/crucible#586
- GaloisInc/asl-translator#28

This patch updates the following packages:
- macaw-base
- macaw-symbolic
- macaw-x86
- macaw-x86-symbolic
- macaw-aarch32
- macaw-ppc
- macaw-semmc
- macaw-refinement
brianhuffman pushed a commit to GaloisInc/macaw that referenced this pull request Dec 2, 2020
This patch relies on the following submodule updates:
- GaloisInc/what4#77
- GaloisInc/elf-edit#20
- GaloisInc/crucible#586
- GaloisInc/asl-translator#28

This patch updates the following packages:
- macaw-base
- macaw-symbolic
- macaw-x86
- macaw-x86-symbolic
- macaw-aarch32
- macaw-ppc
- macaw-semmc
- macaw-refinement
brianhuffman pushed a commit to GaloisInc/saw-script that referenced this pull request Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants