[Caml-list] Camlp4 quotations for tuples

2009-07-28 Thread Philippe Veber
Hi list, Does someone know how to write a camlp4 quotation for types of the form 'a * 'b * 'c * 'd ... For now I could only obtain types of the form 'a * ('b * ('c * ('d * ... )...))), using a code similar to List.fold_right (fun x accu - :ctyp $x$ * $accu$ ) (List.tl tuple_types)

[Caml-list] Envie de partir a Marrakech ?

2009-07-28 Thread David
  GoToMarrakech Une semaine a Marrakech pour deux personnes c'est simple, inscription ( http://www.jeux-marrakech.com/index-inscription.html; ) en moins de 2 minutes Chaque semaine des vacances au soleil : vous vous inscrivez vous et attendez d'etre tiree au sort, une inscription est valable

[Caml-list] Re: Camlp4 quotations for tuples

2009-07-28 Thread Philippe Veber
Self-answer, though I'm not sure that's the prettiest way (not even sure it is even valid) : :ctyp ($Ast.tySta_of_list tuple_types$) ph. 2009/7/28 Philippe Veber philippe.ve...@googlemail.com Hi list, Does someone know how to write a camlp4 quotation for types of the form 'a * 'b * 'c *

[Caml-list] [announce] naclgrid 0.1 (desktop grid engine) released

2009-07-28 Thread William Le Ferrand
-- I apologize if you receive this message more than once Dear list, I'm am very happy to announce the first release of naclgrid, a light desktop grid engine written in jocaml and relying ocsigen. Basically, it's a server where ++ you can upload tasks, tasks being shared libraries that follow

[Caml-list] ocaml icon

2009-07-28 Thread Vu Ngoc San
After installing ocaml on windows, I've be shocked by the old fashioned icon that appears on the desktop. To say it frankly, compared to the other icons showing up on the desktop, it seems quite ugly. Is there somewhere any good replacement for it ?

Re: [Caml-list] ocaml icon

2009-07-28 Thread Vu Ngoc San
Well, this was an incentive to learn inkscape and draw my own icon... Here is what I could come up with: http://ocean.univ-rennes1.fr/perso/san.vu-ngoc/images/ocaml-icon.png This is based on the icon I found at http://www-roc.inria.fr/who/Francois.Clement/icon/JoeCaml.png What do you think ;) ?

Re: [Caml-list] ocaml icon

2009-07-28 Thread Vu Ngoc San
I'm sorry, here is the public address: http://perso.univ-rennes1.fr/san.vu-ngoc/images/ocaml-icon.png San Le mardi 28 juillet 2009 22:42:34, Vu Ngoc San a écrit : Well, this was an incentive to learn inkscape and draw my own icon... Here is what I could come up with:

[Caml-list] annotations and type-checking

2009-07-28 Thread Aaron Bohannon
Why do the first two programs type-check but the thrid one does not? let f x = x in (f true, f 3);; let f (x : 'a) : 'a = x in (f true);; let f (x : 'a) : 'a = x in (f true, f 3);; - Aaron ___ Caml-list mailing list. Subscription management:

Re: [Caml-list] annotations and type-checking

2009-07-28 Thread Jon Harrop
On Tuesday 28 July 2009 22:47:25 Aaron Bohannon wrote: let f (x : 'a) : 'a = x in (f true, f 3);; Err, good question. :-) # let f : _ = fun x - x in f true, f 3;; - : bool * int = (true, 3) # let f : 'a = fun x - x in f true, f 3;; Error: This expression has type int but is here used with type

Re: [Caml-list] annotations and type-checking

2009-07-28 Thread Philippe
Le 29 juil. 09 à 01:28, Jon Harrop j...@ffconsultancy.com a écrit : On Tuesday 28 July 2009 22:47:25 Aaron Bohannon wrote: let f (x : 'a) : 'a = x in (f true, f 3);; Err, good question. :-) # let f : _ = fun x - x in f true, f 3;; - : bool * int = (true, 3) The type of f here is

[Caml-list] Physical counterpart to Pervasives.compare?

2009-07-28 Thread Elnatan Reisner
Is there something that can complete this analogy: (=) is to (==) as Pervasives.compare is to ___? That is, is there a polymorphic total ordering with respect to *physical* entities, rather than to their structure? I'm afraid of getting into trouble with Obj.magic, but what would this do: let f

Re: [Caml-list] Physical counterpart to Pervasives.compare?

2009-07-28 Thread Edgar Friendly
Elnatan Reisner wrote: Is there something that can complete this analogy: (=) is to (==) as Pervasives.compare is to ___? That is, is there a polymorphic total ordering with respect to *physical* entities, rather than to their structure? No, but it'd be pretty trivial to implement through

Re: [Caml-list] Physical counterpart to Pervasives.compare?

2009-07-28 Thread Edgar Friendly
Edgar Friendly wrote: Elnatan Reisner wrote: I'm afraid of getting into trouble with Obj.magic, but what would this do: let f (x:'a) (y:'a) = compare (Obj.magic x) (Obj.magic y) ? Or would annotations make any difference: let f (x:'a) (y:'a) = compare (Obj.magic x : int) (Obj.magic y : int)

Re: [Caml-list] annotations and type-checking

2009-07-28 Thread Johannes Kanig
Philippe wrote: Le 29 juil. 09 à 01:28, Jon Harrop j...@ffconsultancy.com a écrit : I'm guessing the scope of the 'a is not what you'd expect but I have no idea why. I'd have thought the latter would be a harmless type annotation... My guess is that the problem here is not about scope but