Version française
Home     About     Download     Resources     Contact us    
Browse thread
Record field update using 'with' syntax
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Yoann Padioleau <Yoann.Padioleau@e...>
Subject: Re: [Caml-list] Record field update using 'with' syntax
"Denis Bueno" <dbueno@gmail.com> writes:

> On 9/18/06, Martin Jambon <martin1977@laposte.net> wrote:
>> On Mon, 18 Sep 2006, Denis Bueno wrote:
>> > Why doesn't the following work in a function?
>> >
>> >     {M1.instance with x = 20}
>>        ^^^^^^^^^^^
>>        this is an arbitrary expression, it doesn't have to come from the
>>        module where the record type is defined, so you need to specify it
>>        too.

Still, the machine could infer this information. Do we not all 
like type inference ? Why not extend it to this problem ? 


>>
>
> Makes sense. Thanks.
>
> -Denis
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs