+RTS --help says flags are available when they're not
Summary
+RTS --help says "The following run time system options are available:", but some of them are not.
I notice this all the time with -B
, which would be a particularly useful first tool for new and old haskellers to detect excessive memory use.
But the main point is that the help is incorrect.
Steps to reproduce
Compile an executable without -rtsopts (?).
Run it with +RTS --help
, see that -B
is listed.
Run it with +RTS -B
.
Program fails to start, saying "Most RTS options are disabled. Link with -rtsopts to enable them.".
Expected behavior
+RTS -B
should work as described, ringing the bell on each garbage collection. Or, it should not be listed in the help (or should be marked as disabled).
Environment
GHC 8.10.7 on mac m1, installed with ghcup.
Edited by Simon Michael