I recommend we start looking at this by implementing parsers and reviewing known language parsers (the #language-implementation Slack channel probably has quite a few we can run it on). As long as the fix doesn't introduce a compiler error, the removal should should be okay.
(Originally suggested in #109)
We should detect when
lazy
functions (not the Html one) that allow recursive elements is used unnecessarily.This would be useful for the following modules:
Random
Parser
andParser.Advanced
Json.Decode
Success
Lazy is needed
We'd need to check for cycles, because sometimes the recursion is indirect
Fail
Lazy is unnecessary because referenced in a function (and not a constant)
Lazy is unnecessary, because not self-recursive
Advice
I recommend we start looking at this by implementing parsers and reviewing known language parsers (the #language-implementation Slack channel probably has quite a few we can run it on). As long as the fix doesn't introduce a compiler error, the removal should should be okay.