- standard libraries, after which the prompt is shown. If we follow
- the instructions and type <literal>:?</literal> for help, we
- get:</para>
-
-<screen>
- Commands available from the prompt:
-
- <stmt> evaluate/run <stmt>
- :add <filename> ... add module(s) to the current target set
- :browse [*]<module> display the names defined by <module>
- :cd <dir> change directory to <dir>
- :def <cmd> <expr> define a command :<cmd>
- :edit <file> edit file
- :edit edit last module
- :help, :? display this list of commands
- :info [<name> ...] display information about the given names
- :load <filename> ... load module(s) and their dependents
- :module [+/-] [*]<mod> ... set the context for expression evaluation
- :main [<arguments> ...] run the main function with the given arguments
- :reload reload the current module set
-
- :set <option> ... set options
- :set args <arg> ... set the arguments returned by System.getArgs
- :set prog <progname> set the value returned by System.getProgName
- :set prompt <prompt> set the prompt used in GHCi
- :set editor <cmd> set the command used for :edit
-
- :show modules show the currently loaded modules
- :show bindings show the current bindings made at the prompt
-
- :ctags [<file>] create tags file for Vi (default: "tags")
- :etags [<file>] create tags file for Emacs (default: "TAGS")
- :type <expr> show the type of <expr>
- :kind <type> show the kind of <type>
- :undef <cmd> undefine user-defined command :<cmd>
- :unset <option> ... unset options
- :quit exit GHCi
- :!<command> run the shell command <command>
-
- Options for ':set' and ':unset':
-
- +r revert top-level expressions after each evaluation
- +s print timing/memory stats after each evaluation
- +t print type after evaluation
- -<flags> most GHC command line flags can also be set here
- (eg. -v2, -fglasgow-exts, etc.)
-</screen>