我在通过Godi安装的Ubuntu上运行Ocaml 3.12。
我要检查一下Lwt tutorial。我已经启动了toplevel并完成了(按照说明):
# #use "topfind";;
# #require "lwt";;"lwt“的需求似乎是成功的(没有关于找不到它的抱怨)。过了一会儿,我试了试:
# Lwt_io.read_char;;而toplevel抱怨道:
# Error: Reference to undefined global `Lwt_io'当我查看~/godi-3.12/lib/ocaml/pkg-lib/lwt时,我看到了lwt_io.cmi和lwt_io.mli文件。godi说我安装了2.2.1版本的lwt。
我也试过运行lwt-toplevel,但无法在其中键入任何内容...
发布于 2011-05-08 05:23:30
Lwt_io模块属于lwt.unix子包。使用它:
#require "lwt.unix";;https://stackoverflow.com/questions/5923788
复制相似问题