From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 7C7DFBB81 for ; Sat, 12 Nov 2005 16:27:09 +0100 (CET) Received: from hedwig1.umh.ac.be (hedwig2.umh.ac.be [193.190.193.73]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jACFR93m025894 for ; Sat, 12 Nov 2005 16:27:09 +0100 Received: from poincare (Debian-exim@pri-010.umh.ac.be [10.101.0.10]) by hedwig1.umh.ac.be (8.13.1/8.13.1) with ESMTP id jACFS9ps4038668; Sat, 12 Nov 2005 16:28:10 +0100 Received: from localhost ([127.0.0.1] ident=trch) by poincare with esmtp (Exim 4.54) id 1EaxHC-0003ZQ-OU; Sat, 12 Nov 2005 16:26:46 +0100 Date: Sat, 12 Nov 2005 16:26:46 +0100 (CET) Message-Id: <20051112.162646.07976715.Christophe.Troestler@umh.ac.be> To: micha-1@fantasymail.de Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] strange behavior with record type definition From: Christophe TROESTLER In-Reply-To: <200511121515.18429.micha-1@fantasymail.de> References: <4375DDFC.9060802@motion-twin.com> <1131799890.18524.14.camel@rosella> <200511121515.18429.micha-1@fantasymail.de> Organization: Universite de Mons-Hainaut (http://math.umh.ac.be/an/) X-Spook: spy brigand kibo BLU-114/B Cocaine virus Manfurov asset Project Monarch Sears Tower X-Blessing: Om Ah Hum Vajra Guru Pema Siddhi Hum X-Operating-System: GNU/Linux (http://www.linux.org/) X-Mailer-URL: http://www.mew.org/ X-Mailer: Mew version 4.2.53 on Emacs 22.0.50 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.1 (www dot roaringpenguin dot com slash mimedefang) X-Miltered: at concorde with ID 437609CD.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 christophe:01 troestler:01 christophe:01 troestler:01 umh:01 struct:01 struct:01 2005,:98 wrote:01 wrote:01 expression:01 int:01 int:01 modules:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Sat, 12 Nov 2005, Michael Wohlwend wrote: > > On Saturday 12 November 2005 13:51, skaller wrote: > > > > So that the type of an expression: > > > > > > > > { x = 1; y = 2 } > > > > > > > > can be determined. > > I would have no problem to write in these situations Type1.{ x = 1 } or > Type2.{x = 2} , I think there exists camlp4 program for this. You can do almost the same with modules: module T1 = struct type t = { x : int; y : int } end module T2 = struct type t = { x : int; y : int } end { T1.x = 1; y = 2 } (* No need to repeat the module name *) { T2.x = 2; y = 3 } ChriS