2

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

enter image description here

Sanfer
  • 414
  • 5
  • 16

1 Answers1

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