[Caml-list] ​World Congress on Internet Security (WorldCIS-2012): Call for Papers!

2012-01-10 Thread Paul Kelly
Apologies for cross-postings. Please send it to interested colleagues and students. Thanks! CALL FOR PAPERS World Congress on Internet Security (WorldCIS-2012) Technically Co-Sponsored by IEEE UK/RI Computer Chapter and IEEE K/W Section Jun

Re: [Caml-list] References and polymorphism

2012-01-10 Thread Gabriel Scherer
For a description of how the value restriction is relaxed in the OCaml type system, see the article "Relaxing the value restriction", by Jacques Garrigue, 2004 http://caml.inria.fr/about/papers.en.html On Tue, Jan 10, 2012 at 6:20 PM, David Allsopp wrote: > Dario Teixeira wrote: >> Thank you,

[Caml-list] SFM-12:MDE in Bertinoro -- first call for participation

2012-01-10 Thread Marco Bernardo
*** * * *SFM-12:MDE * * * * 12th International School on *

RE: [Caml-list] References and polymorphism

2012-01-10 Thread David Allsopp
Dario Teixeira wrote: > Thank you, Romain and Arnaud.  With that "list ref" example in mind, it > does make sense for the compiler to play it safe and declare foobar2 to > be non-polymorphic.  Moreover, this is one of those issues where I I > suspect that compiler elfs must have pondered already ho

Re: [Caml-list] References and polymorphism

2012-01-10 Thread Dario Teixeira
Hi, Thank you, Romain and Arnaud.  With that "list ref" example in mind, it does make sense for the compiler to play it safe and declare foobar2 to be non-polymorphic.  Moreover, this is one of those issues where I I suspect that compiler elfs must have pondered already how easy/feasible it would

[Caml-list] Turing Centenary Conference in Cambridge - Submission Deadline Jan. 20, 2012

2012-01-10 Thread S B Cooper
** FINAL CALL FOR PAPERS: TURING CENTENARY CONFERENCE http://www.cie2012.eu Computability in Europe 2012: How the World Computes University of Cambridge

Re: [Caml-list] References and polymorphism

2012-01-10 Thread Arnaud Spiwack
I guess a canonical example of the reason behind this restriction would be the following: let put = let r = ref [] in fun x -> r := x::!r OCaml will tell you that it has type '_a -> unit. It would be unsound (exercise!) to decide it has type 'a -> unit. Of course, your example is perfectly sound

Re: [Caml-list] References and polymorphism

2012-01-10 Thread Romain Bardou
Le 10/01/2012 16:29, Dario Teixeira a écrit : Hi, Consider functions foobar1 and foobar2: type 'a t = {id: int; x: 'a} let foobar1: 'a -> 'a t = fun x -> {id = 0; x} let foobar2: 'a -> 'a t = let ctr = ref 0 in fun x -> incr ctr; {id = !ctr; x} I would expec

[Caml-list] References and polymorphism

2012-01-10 Thread Dario Teixeira
Hi, Consider functions foobar1 and foobar2: type 'a t = {id: int; x: 'a} let foobar1: 'a -> 'a t =     fun x -> {id = 0; x} let foobar2: 'a -> 'a t =     let ctr = ref 0 in     fun x -> incr ctr; {id = !ctr; x} I would expect them to have the same type, because foobar2's use of