-
-
Notifications
You must be signed in to change notification settings - Fork 821
Warn for pure unused functions #4479
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
Warn for pure unused functions #4479
Conversation
ad5c87e
to
c11707d
Compare
c11707d
to
2317c2f
Compare
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.
Fantastic! Thank you. I've left some notes inline.
Purity hasn't been included in the package interface, which I think is a good idea for now.
It could be even more useful if the compiler knows that functions such as list.reverse
and dict.get
are pure. Do we want to have a hard-coded list of pure stdlib functions?
I think having a list of pure stdlib functions is good, especially for things like |
I've now added the
|
00872d9
to
c447e81
Compare
Based on our discussion on Discord, I've reverted some of my changes to the purity tracking system to make it simple but effective enough for the current use case. |
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.
Fantastic! Really liking this. I've left a few notes inline about some comments, just to make sure we understand this in future as it's conceptually quite complex.
6a43be4
to
fe80441
Compare
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.
Really fantastic documentation there! I love it. Thank you!
fe80441
to
445747a
Compare
Closes #4477