I call require "lwt.simple-top" ;;
on utop and try a simple example but it is not able to find the operator >>=
.
Asked
Active
Viewed 601 times
2

Sanfer
- 414
- 5
- 16
-
2You can get it if you `open Lwt` first. – Steve Vinoski Dec 20 '15 at 15:51
-
1Or `open Lwt.Infix` if you only want to pull in operators. – hcarty Dec 20 '15 at 17:34
1 Answers
5
The #require
is a toplevel directive, that link the library code into the toplevel. It doesn't open any modules. So in order to get the infix operators >>=
and >|=
, you need to open Lwt.Infix
or Lwt
modules, the latter will also bring all definitions from Lwt
module, that may be considered as a namespac pollution.

ivg
- 34,431
- 2
- 35
- 63