5.2. Static, Dynamic, and Mode options
Prev | Chapter 5. Using GHC | Next

## 5.2. Static, Dynamic, and Mode options

Each of GHC's command line options is classified as static, dynamic or mode:

Mode flags

  For example, `--make` or `-E`. There may only be a single mode flag on the command line. The available modes are listed in Section 5.4, “Modes of operation”.

Dynamic Flags

  Most non-mode flags fall into this category. A dynamic flag may be used on the command line, in a `GHC_OPTIONS` pragma in a source file, or set using `:set` in GHCi.

Static Flags

  A few flags are "static", which means they can only be used on the command-line, and remain in force over the entire GHC/GHCi run.

The flag reference tables (Section 5.17, “Flag reference”) lists the status of each flag.

There are a few flags that are static except that they can also be used with GHCi's `:set` command; these are listed as “static/`:set`” in the table.

Prev | Up | Next
Chapter 5. Using GHC | Home | 5.3. Meaningful file suffixes