GHCi :set command

  • Overview of options
  • Allow multiline commands (+m)
  • Show types (+t)
  • Show statistics (+s)
  • Collect source information (+c)

The :set command can be used to change various behaviors of GHCi from within a running REPL. Options set with the :set command can be undone with the :unset command.

Overview of options

Options starting with + are specific to GHCi. This is the complete list:These options are also listed in the GHCi options section of the GHC manual.

+mAllow multiline commands
+rDiscard evaluation of top-level expressions after each evaluation
+sDisplay statistics about time and memory usage after each evaluation
+tPrint type after each evaluation
+cCollect source information needed to support the :all-types, :loc-at, :type-at, and :uses commands.

Options starting with - are GHC command-line options. The list of these is long, but here are just a few examples:

-vSet higher debug output verbosity
-WallEnable all compiler warnings
-XOverloadedStringsEnable the OverloadedStrings extension

Sign up for access to the full page, plus the complete archive and all the latest content.