Go to GHCi prompt and type :? for a list of commands.
*Main> :?
Commands available from the prompt:evaluate/run
: repeat last command
:{\n ..lines.. \n:}\n multiline command
:add [*]... add module(s) to the current target set
:browse[!] [[*]] display the names defined by module
(!: more details; *: all top-level names)
:cdchange directory to
:cmdrun the commands returned by ::IO String
:complete[ ] list completions for partial input string
:ctags[!] [] create tags file for Vi (default: "tags")
(!: use regex instead of line number)
:defdefine command : (later defined command has
precedence, ::is always a builtin command)
:editedit file
:edit edit last module
:etags [] create tags file for Emacs (default: "TAGS")
:help, :? display this list of commands
:info[!] [...] display information about the given names
(!: do not filter instances)
:issafe [] display safe haskell information of module
:kind[!]show the kind of
(!: also print the normalised type)
:load [*]... load module(s) and their dependents
:main [ ...] run the main function with the given arguments
:module [+/-] [*]... set the context for expression evaluation
:quit exit GHCi
:reload reload the current module set
:run function [ ...] run the function with the given arguments
:scriptrun the script
:typeshow the type of
:undefundefine user-defined command :
:!run the shell command
-- Commands for debugging:
:abandon at a breakpoint, abandon current computation
:back go back in the history (after :trace)
:break [] [ ] set a breakpoint at the specified location
:breakset a breakpoint on the specified function
:continue resume after a breakpoint
:deletedelete the specified breakpoint
:delete * delete all breakpoints
:force, forcing unevaluated parts
:forward go forward in the history (after :back)
:history [] after :trace, show the execution history
:list show the source code around current breakpoint
:listshow the source code for
:list [] show the source code around line number
:print [...] show a value without forcing its computation
:sprint [...] simplified version of :print
:step single-step after stopping at a breakpoint
:stepsingle-step into
:steplocal single-step within the current top-level binding
:stepmodule single-step restricted to the current module
:trace trace after stopping at a breakpoint
:traceevaluate with tracing on (see :history)
-- Commands for changing settings:
:set
This post first appeared on Java Tutorial : Blog To Learn Java Programming, please read the originial post: here