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

Ways to modify writeControls during writing #1092

Open
shirok opened this issue Dec 15, 2024 · 0 comments
Open

Ways to modify writeControls during writing #1092

shirok opened this issue Dec 15, 2024 · 0 comments

Comments

@shirok
Copy link
Owner

shirok commented Dec 15, 2024

We want to tweak writeControls temporarily while write method is called recursively, e.g. we want to print a part of data structure with certain controls, but want to inherit other control options.

The controls have a dynamic extend of outermost write procedure, and its per port. Currently such transient controls are hidden from Scheme. (It is available in the printer method in C level).

How shall we expose such transient controls and allow users to modify it?

  • Expose it as if it is a dynamic state (e.g. "current write controls"). It's per-port so it can't just be a parameter.
  • Do not expose it, but allows users to "merge" given controls to the current implicit one. We need a special way to indicate "don't care" or "use the fallback" value to create a new controls.
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

No branches or pull requests

1 participant