ocsigen / tutorial-deprecated

Deprecated. Please use repository tuto instead.
http://ocsigen.org/tuto/manual/
10 stars 17 forks source link

tutoreact: Ocsipersist.open_table returns an lwt value #65

Open adrien-n opened 7 years ago

adrien-n commented 7 years ago

In src/tutoreact.wiki, there is the following code:

let db = Ocsipersist.open_table "messages" [...] let get_message id = Ocsipersist.find db (string_of_int id) [...] let add_message v = [...] let%lwt () = Ocsipersist.add db (string_of_int index) v in

However Ocsipersist.open_table returns a value of type 'a Ocsipersist.table Lwt.t while Ocsipersist.find's and Ocsipersist.add's first argument must be of type 'b Ocsipersist.table .

vasilisp commented 7 years ago

The signature of open_table has changed quite recently and the doc is out-of-date. Fixes welcome :).