开发者

Trying to go through Lwt tutorial, but there seems to be a library problem

I'm running Ocaml 3.12 on Ubuntu installed via Godi.

I'm going through the Lwt tutorial. I've started up the toplevel and done (as instructed):

# #use "topfind";;
# #require "lwt";;

The require of "lwt" seems to be successful (no complaints about not being able to find it). Then a bit later I try:

# Lwt_io.read_char;;

And the toplevel complains:

# Error: Reference to undefined global `Lwt_io'

When I look in ~/godi-3.12/lib/ocaml/pkg-lib/lwt I see that lwt_io.cmi and lwt_io.mli files are present. godi says I have ve开发者_开发百科rsion 2.2.1 of lwt installed.

I also tried running lwt-toplevel, but could not type anything into it...


Lwt_io module belongs to lwt.unix subpackage. Use it:

#require "lwt.unix";;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜