[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mirage cheat sheets



You're both right... this behaviour is configurable in the syntax extension via 
-lwt-strict-sequence, which matches the OCaml option that forces the behaviour 
of making the semicolon have type unit too.

We don't have that option in our Pa_lwt yet (was going to do so when plumbing 
through all the debugging and profiling options), but it's easy to add.

Having it on for the whole tree is a very good idea, at least for the OCaml 
option, and the Lwt one can't hurt.

One thing I really dislike the use of >> for this extension though. I'm 
surprised it works at all, as it clashes with the camlp4 quotation keyword!  
Something like >;> or anything else with a semicolon would make it more obvious 
it has the same behaviour as that...

Anil

On 16 Sep 2011, at 18:12, Raphael Proust wrote:

> I'm not entirely sure, but I think the syntax "t >> f" translates to
> "t >>= fun _ -> f" (with _ instead of ()). Also, naming the right hand
> part as f can mislead ppl into thinking it's a function.
> 
> 
> On 9/16/11, Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxx> wrote:
>> Hi all,
>> 
>> I've tried to create a small cheat sheet on mirage syntax extension. A first
>> draft is available here :
>> http://gazagnaire.org/docs/mirage.pdf
>> 
>> I plan to print a bunch of then before taking my plane to Japan (in 2h) so
>> would be nice if some of you knowing lwt can read it before that :-)
>> 
>> Thomas
> 
> 
> -- 
> _______
> Raphael
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.