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

Add all compiler options to documentation #690

Open
developedby opened this issue Aug 21, 2024 · 0 comments
Open

Add all compiler options to documentation #690

developedby opened this issue Aug 21, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@developedby
Copy link
Member

The compiler options are described in https://github.com/HigherOrderCO/Bend/blob/main/docs/compiler-options.md.

However, it only talks about options that change the compilation output.
There are other options that need to be added there:

Warnings

Specific warnings can be shown or not, or can be treated as errors. The choice of what to do with a warning is called the severity. The flags for that are -Dwarning-name (deny, treat as error), -Awarning-name (allow, don't show), `-Wwarning-name (warn, the default of most things).

The existing individual warnings are: irrefutable-match, redundant-match, unreachable-match, unused-definition, repeated-bind, recursion-cycle, import-shadow, missing-main.

We can also toggle all warnings to one of the severities with -Aall, -Wall or -Dall.

Runtime options

Besides the compiler, we can pass some options to select how hvm is run. These apply only to the run* commands (run, run-c, run-rs, run-cu).

  • --stats, -s: Shows some runtime information on elapsed time, number of interactions, etc.
  • --pretty, -p: Shows the result in a prettified form (better indentation mostly).
  • --linear, -l: Uses a different algorithm for reading HVM results that shows the duplications in the output.
  • --hvm-bin=<path>: Pass a different executable to run instead of just calling the hvm command. Can also be set (with lesser priority) by the HVM_BIN environment variable.
@developedby developedby added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant