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

Should multiple-value static infos live under a key? #439

Open
usaoc opened this issue Dec 14, 2023 · 2 comments
Open

Should multiple-value static infos live under a key? #439

usaoc opened this issue Dec 14, 2023 · 2 comments

Comments

@usaoc
Copy link
Collaborator

usaoc commented Dec 14, 2023

Currently, multiple-value static infos live under #%values/statinfo_meta.values_key, but I think some aspects of them make them different than other genuine static info:

  • Static infos of different arity are incompatible, and their combination renders the whole package invalid;
  • Manipulation of static infos, such as union and intersection, must be aware of the arity;
  • #%values cannot be combined with other keys in any meaningful way;
  • Lookup should simply fail when the static infos are for anything other than arity 1.

Does it make more sense to revise the representation of static infos to accomodate for multiple-value cases? The drawback is, of course, more verbose manipulation for the most common case of arity 1.

@mflatt
Copy link
Member

mflatt commented Dec 17, 2023

Possibly something to consider at the same time: Should each static-info key should be bound to a compile-time value that implements intersection and union operations for the key?

usaoc added a commit that referenced this issue Jan 1, 2024
This is by no means a complete solution to #439, but it tries a little
bit harder to normalize the multiple-value static infos (and also
assumes harder the `((#%values (<infos> ...)))` shape).

Also fix a curious bug in `def`/`let` that fails to propagate
single-value static infos wrapped in `#%values`.
@mflatt
Copy link
Member

mflatt commented Jun 19, 2024

When revising the representation of static information to use a binding to compile-time union and intersection functions (ef71819), I did not find a better way to handle this than #%values. It helps a little that #%values is responsible for its own union and intersection operations, though.

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

2 participants