[Caml-list] A strange typing error with polymorphic variants

2009-10-27 Thread Marc de Falco
Hi, I've come across a very strange error, and I'm not sure if it is a bug or a feature. The following code : type 'a p = R of 'a t | E of float and 'a t = { mutable p : 'a p; c : 'a } let f = let x = sqrt(2.0) in fun () -> { c = `A; p = E 0.0 } generates the error : The type of thi

Re: [Caml-list] A strange typing error with polymorphic variants

2009-10-27 Thread Jake Donham
On Tue, Oct 27, 2009 at 3:28 AM, Marc de Falco wrote: > Hi, I've come across a very strange error, and I'm not sure if it is > a bug or a feature. > > The following code : > type 'a p = R of 'a t | E of float >     and 'a t = { mutable p : 'a p; c : 'a } > let f = >     let x = sqrt(2.0) in >    

Re: [Caml-list] A strange typing error with polymorphic variants

2009-10-27 Thread Vincent Aravantinos
Le 27 oct. 09 à 19:24, Jake Donham a écrit : On Tue, Oct 27, 2009 at 3:28 AM, Marc de Falco wrote: The following code : type 'a p = R of 'a t | E of float and 'a t = { mutable p : 'a p; c : 'a } let f = let x = sqrt(2.0) in fun () -> { c = `A; p = E 0.0 } generates the error :

Re: [Caml-list] A strange typing error with polymorphic variants

2009-10-27 Thread Vincent Aravantinos
Oops, I pushed "send" button too early. Le 27 oct. 09 à 19:38, Vincent Aravantinos a écrit : Le 27 oct. 09 à 19:24, Jake Donham a écrit : On Tue, Oct 27, 2009 at 3:28 AM, Marc de Falco wrote: The following code : type 'a p = R of 'a t | E of float and 'a t = { mutable p : 'a p; c : 'a }