Chinaunix首页 | 论坛 | 博客
  • 博客访问: 466692
  • 博文数量: 55
  • 博客积分: 2603
  • 博客等级: 少校
  • 技术积分: 750
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-31 02:30
文章分类

全部博文(55)

文章存档

2011年(1)

2010年(22)

2009年(17)

2008年(15)

我的朋友

分类:

2010-11-25 22:41:30

编译了一个,有很多有意思的东西

 在此。列举几处我比较有兴趣的:

  • 基于 epoll/kqueue 的IO
  • 可以生成 LLVM 代码
  • 翻新了大量模块,特别是线程或异常阻塞有关的
  • ghci 现在完整支持 import
  • 支持 haskel 2010 ,但是新标准可能会与传统的 base 模块冲突,建议使用ghc/ghci时用以下命令屏蔽冲突模块:
ghci -package haskell2010 -hide-package base -hide-package array
  • 现在支持 utf8 编码的源码文件,以及,甚至有一些 unicode 字符可以直接成为语法的一部分。
  • GC 固定为两代回收
  • 现在 ghc 可以向操作系统归还内存(至少 Python 和 Java 都还不能,C 的 free 在这方面也不是很有效)。
  • 优化了 ghci 的沙盒

我在 ghci 里 :help 了一下,内容跟以前非常不同了。如下所示,有几个功能非常有爱,如:

  • 可以支持多行
  • 能够生成 etags 和 ctags
*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                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 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 


阅读(25583) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~