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

Fix constructor-style printing for hashes. #221

Closed

Conversation

mikesperber
Copy link
Member

Fixes #220.

Wrap a struct around hashes that has a custom print-converter.

NOTE: While this works correctly in the #langs, this fails the tests in htdp-test/tests/htdp-lang/advanced.rktl, as they pick up the correct binding for make-hash, but not for make-copy etc.

Fixes racket#220.

Wrap a struct around hashes that has a custom print-converter.

NOTE: While this works correctly in the #langs, this fails the tests
in htdp-test/tests/htdp-lang/advanced.rktl, as they pick up the
correct binding for make-hash, but not for make-copy etc.
@mikesperber mikesperber marked this pull request as draft June 27, 2024 14:09
@mikesperber
Copy link
Member Author

I could use some help with this PR: I don't know why the tests pick up the correct binding for make-hash, but the original binding for make-copy etc.

@rfindler
Copy link
Member

rfindler commented Jun 27, 2024 via email

@mikesperber
Copy link
Member Author

@rfindler Sure - but I think this reveals that the concept of print-convert is ultimately flawed, as you really need to parameterize everything about it. It would be better to be able to register a lang-specific function that does all of the work, and maybe provide a library of helpers that this function could call.

@mikesperber
Copy link
Member Author

@rfindler Bump ... on adding the necessary option to print-convert, as discussed today.

@rfindler
Copy link
Member

I've pushed a fix for #220 by changing print convert instead of this strategy.

Sorry for the delay.

@shhyou shhyou closed this Dec 7, 2024
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.

Hashes are printed incorrectly in ASL
3 participants