分类:
2010-11-25 22:41:30
编译了一个,有很多有意思的东西
在此。列举几处我比较有兴趣的:
ghci -package haskell2010 -hide-package base -hide-package array
我在 ghci 里 :help 了一下,内容跟以前非常不同了。如下所示,有几个功能非常有爱,如:
*Main> :help 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 :ctags[!] [ ] create tags file for Vi (default: "tags") (!: use regex instead of line number) :def define a 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 :kind show the kind of :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 :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 , 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 identifier show the source code for :list [ ] show the source code around line number :print [ ...] prints a value without forcing its computation :sprint [ ...] simplifed 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