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
Add %deprecate pragma #2086
Add %deprecate pragma #2086
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the fact checkDeprecation
is called from CompileExpr
mean that we get away with
using deprecated functions in values that have a 0
quantity and are not compiled?
Should this be checked during variable lookup in TTImp.Elab.App
instead?
Not sure, I'll try that and see.
Quite possibly. Thanks for the idea. Where to check this was roughly a guess on my part so I only know that it works for the cases I tested but not that it's the best place to put it. |
Much better results; in broad strokes moving to |
Add the
%deprecate
pragma as proposed here.Closes #2082.
In short, add
%deprecate
before a definition to cause the compiler to generate a warning whenever the given function is applied. Modify or add code documentation (||| docs
) for the definition to give any additional suggestions you want printed along with the warning.%deprecate
pragma and associated warning.