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

load builtins do not shows a warning when a rule fails to load #1000

Open
mmatera opened this issue Feb 8, 2024 · 0 comments
Open

load builtins do not shows a warning when a rule fails to load #1000

mmatera opened this issue Feb 8, 2024 · 0 comments

Comments

@mmatera
Copy link
Contributor

mmatera commented Feb 8, 2024

#996 puts the manifest the need to check if the rules included in the rule attribute of Builtin symbols are loaded or not. This happens for example when a rule in one Builtin symbol tries to define another symbol. In that case, the symbol Quit includes a rule to define the alias Exit with the rule Exit[n___]->Quit[n]. The problem is that this rule does not define a DownValue / Upvalue/ Subvalue; in the end, it is never added as a definition in the Definitions object.

I do not have a clear idea of the best way to handle this kind of case: One thing would be to create the Definition for the symbol (if it was not already loaded) and then add the rule. This has certain complexities and drawbacks: for example, if there is a Builtin, should the rule have higher priority than the rules in the Builtin?

The other way (much simpler) would be to just to add a warning when the rule cannot be associated to a *Value of the Builtin we are processing.

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