Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Haskell: List all commands


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)
:cd change directory to
:cmd run 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)
:def define command : (later defined command has
precedence, :: is always a builtin command)
:edit edit 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
:script run the script
:type show the type of
:undef undefine 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
:break set a breakpoint on the specified function
:continue resume after a breakpoint
:delete delete the specified breakpoint
:delete * delete all breakpoints
:force print , 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
:list show 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
:step single-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
:trace evaluate with tracing on (see :history)

-- Commands for changing settings:

:set




Previous                                                 Next                                                 Home


This post first appeared on Java Tutorial : Blog To Learn Java Programming, please read the originial post: here

Share the post

Haskell: List all commands

×

Subscribe to Java Tutorial : Blog To Learn Java Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×