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

Don't warn on unused generated definitions #514

Closed
developedby opened this issue May 27, 2024 · 1 comment · Fixed by #544
Closed

Don't warn on unused generated definitions #514

developedby opened this issue May 27, 2024 · 1 comment · Fixed by #544
Labels
compilation Compilation of terms and functions to HVM enhancement New feature or request

Comments

@developedby
Copy link
Member

When a definition is unused, all of it's generated children will also be unused, which leads to the user-provided function to be printed many times as unused.

For example

def inc(bits):
  match bits:
    case Bits/E:
      return Bits/I (Bits/E)
    case Bits/O:
      return Bits/I (bits.pred)
    case Bits/I:
      return Bits/O (inc(bits.pred))

Will generate the Definition is unused warning 5 times.

Instead, we should check that to send this warning, definitions should not be builtin and should not be generated.

@developedby developedby added enhancement New feature or request compilation Compilation of terms and functions to HVM labels May 27, 2024
@LunaAmora LunaAmora mentioned this issue Jun 7, 2024
9 tasks
@developedby developedby reopened this Jun 10, 2024
@developedby
Copy link
Member Author

Will be closed by #544 as far as I understand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compilation Compilation of terms and functions to HVM enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant