From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id AAA12050 for caml-redistribution@pauillac.inria.fr; Fri, 18 Feb 2000 00:31:12 +0100 (MET) Resent-Message-Id: <200002172331.AAA12050@pauillac.inria.fr> Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA21997 for ; Wed, 16 Feb 2000 15:05:34 +0100 (MET) Received: from terre.irisa.fr (terre.irisa.fr [131.254.60.118]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id PAA02467 for ; Wed, 16 Feb 2000 15:05:33 +0100 (MET) Received: from irisa.fr (cripure.irisa.fr [131.254.50.54]) by terre.irisa.fr (8.9.3/8.9.3) with ESMTP id PAA21170 for ; Wed, 16 Feb 2000 15:05:32 +0100 (MET) Sender: Thomas.Colcombet@irisa.fr Message-ID: <38AAAEAC.734A8B13@irisa.fr> Date: Wed, 16 Feb 2000 15:05:32 +0100 From: Thomas Colcombet Organization: IRISA, Campus de Beaulieu, 35042 Rennes Cedex, FRANCE X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.7 sun4u) X-Accept-Language: fr, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: hiding the 'mutable' modifier Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-From: weis@pauillac.inria.fr Resent-Date: Fri, 18 Feb 2000 00:31:11 +0100 Resent-To: caml-redistribution@pauillac.inria.fr hello, I'd like to do something that looks like : module A = (struct type t = { mutable field : int } end : sig type t = { field : int } end) This is not allowed by ocaml, however I think it would be useful if the mutable field is modified, let's say, only during the construction of terms of type t, but must not be modified outside the module (for consistency reasons). Is there any typing or implementation issue which prevents such mutable modifier hiding ? Thom