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

Simplify Show #75

Open
gmalecha opened this issue Oct 17, 2019 · 7 comments
Open

Simplify Show #75

gmalecha opened this issue Oct 17, 2019 · 7 comments
Labels

Comments

@gmalecha
Copy link
Collaborator

Show got complicated because it tried to do too much. It can generate string, list ascii, etc, any monoid with an injection from ASCII. This means that debugging instances is hard.

@Lysxia
Copy link
Contributor

Lysxia commented Oct 17, 2019

Another option is to deprecate and remove Show altogether. Even if we fixed it, it seems a good candidate to put into its own library.

I recently created coq-ceres as an alternative, using S-expressions instead of strings as a common format that can easily be pretty-printed and parsed.

A proper pretty-printing library also seems like a good idea.

@gmalecha
Copy link
Collaborator Author

I am generally in favor of small libraries, so I would be in favor of moving Show somewhere else.

I don't think that S-expressions solve everything, so I think there is some benefit to more customizable pretty printing library. Perhaps there is some good way to share some of the formatting logic within ceres? I'm thinking of "boxes" and the like.

@gmalecha
Copy link
Collaborator Author

@Lysxia Do you think there is some pieces of ceres that could be reused for this?

@Lysxia
Copy link
Contributor

Lysxia commented Oct 17, 2019 via email

@gmalecha
Copy link
Collaborator Author

Does ceres not generate a string?

@Lysxia
Copy link
Contributor

Lysxia commented Oct 17, 2019

I'm not sure what you're thinking of. There is a function that converts S-expressions (trees) to strings, but there's not much to be reused from it.

@gmalecha
Copy link
Collaborator Author

I see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants