3.7. The :set command

The :set command sets two types of options: GHCi options, which begin with ‘+” and “command-line” options, which begin with ‘-’.

NOTE: at the moment, the :set command doesn't support any kind of quoting in its arguments: quotes will not be removed and cannot be used to group words together. For example, :set -DFOO='BAR BAZ' will not do what you expect.

3.7.1. GHCi options

GHCi options may be set using :set and unset using :unset.

The available GHCi options are:

3.7.2. Setting GHC command-line options in GHCi

Normal GHC command-line options may also be set using :set. For example, to turn on -fglasgow-exts, you would say:

Prelude> :set -fglasgow-exts

Any GHC command-line option that is designated as dynamic (see the table in Section 4.19), may be set using :set. To unset an option, you can set the reverse option:

Prelude> :set -fno-glasgow-exts

Section 4.19 lists the reverse for each option where applicable.

Certain static options (-package, -I, -i, and -l in particular) will also work, but some may not take effect until the next reload.