Re: [Caml-list] Lwt and exceptions

2011-09-17 Thread Dmitry Grebeniuk
Hello. It uses bind and return, but I'm very unsure whether the code can be called monadic IO, since lwt itself does not respect the monad laws. What monadic laws lwt does not respect ? Lwt sees values of type Lwt.t not as IO actions, but sometimes as the values of these actions. It

Re: [Caml-list] pattern matching on strings

2011-09-17 Thread Basile Starynkevitch
On Fri, 16 Sep 2011 22:20:05 +0100 Richard W.M. Jones r...@annexia.org wrote: On Wed, Sep 14, 2011 at 10:40:11PM +0200, Basile Starynkevitch wrote: And there is a reason why you cannot match (in Ocaml) on the content of strings (or arrays). It won't be easy to implement efficiently (you

Re: [Caml-list] pattern matching on strings

2011-09-17 Thread Philippe Veber
Thank you Raphael ! Indeed, keeping the C encoding underneath strings (and arrays) is a nice property. ph. 2011/9/14 Raphael Proust raphla...@gmail.com Richard Jones described the internals of OCaml quite concisely. The difference between char arrays and strings is exposed in part two of his

Re: [Caml-list] Lwt and exceptions

2011-09-17 Thread Stéphane Glondu
Le 17/09/2011 08:38, Dmitry Grebeniuk a écrit : It does not respect the monad associativity: (m = f) = g == m = (fun x - f x = g) [...] == open Lwt; value () = Printf.printf case 1, enter two lines:\n%!; value m = Lwt_io.read_line Lwt_io.stdin; value f_v =

Re: [Caml-list] Odd failure to infer types

2011-09-17 Thread Goswin von Brederlow
Gabriel Scherer gabriel.sche...@gmail.com writes: Indeed, a let-bound [] is generalized to a polymorphic ('a list), while a let-bound (ref []), or (Array.make n []), is not generalized. It would be unsound to do so as if you had a reference to a polymorphic ('a list) you could add elements

[Caml-list] OCaml installer for windows available

2011-09-17 Thread Jonathan Protzenko
Hi all, tl;drhttp://www.urbandictionary.com/define.php?term=tl%3Bdr I created an installer for Windows. I'd be happy if you could try it out, give me feedback, and tell me if it works for you. Download it there: http://yquem.inria.fr/~protzenk/caml-installer.html. What does

[Caml-list] ocamljs

2011-09-17 Thread Christophe Papazian
Hi, One year since the last update of ocamljs. And now, ocaml is 3.12.1, lwt is 2.3. So does anyone know when we will see the next update of ocamljs ? thanks ! Christophe -- Caml-list mailing list. Subscription management and archives: