From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA20608; Sat, 31 Jul 2004 19:45:18 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA21280 for ; Sat, 31 Jul 2004 19:45:17 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from seminole.vervehosting.com (221059.ds.nac.net [66.246.72.191]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i6VHjGSH008004 for ; Sat, 31 Jul 2004 19:45:16 +0200 Received: from pa-bethlprk-cad2-grp1-4-109.pittpa.adelphia.net ([24.50.168.109] helo=[192.168.0.101]) by seminole.vervehosting.com with asmtp (TLSv1:AES256-SHA:256) (Exim 4.34) id 1Bqxuo-00066n-Rw; Sat, 31 Jul 2004 13:45:02 -0400 Message-ID: <410BDABB.2060003@cgorski.org> Date: Sat, 31 Jul 2004 13:45:31 -0400 From: Chris Gorski User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Markus Mottl CC: caml-list@inria.fr Subject: Re: [Caml-list] const equivalent for mutable types? References: <410B5EBD.6060800@cgorski.org> <20040731103412.GA11964@fichte.ai.univie.ac.at> In-Reply-To: <20040731103412.GA11964@fichte.ai.univie.ac.at> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-yoursite-MailScanner-Information: Please contact the ISP for more information X-yoursite-MailScanner: Found to be clean X-MailScanner-From: cgorski@cgorski.org X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - seminole.vervehosting.com X-AntiAbuse: Original Domain - inria.fr X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - cgorski.org X-Miltered: at concorde with ID 410BDAAC.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 const:01 chris:01 chris:01 implements:01 mutable:01 phantom:01 mottl:02 concrete:02 module:03 wrote:03 abstract:03 types:03 types:03 markus:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Markus Mottl wrote: > No, you'd need an abstract module for this to hide the concrete > representation. This is actually good SE-practice. > > You can do this very conveniently using so-called phantom types. For the > special case of references, here is an example that implements ones, > which can be made constant: Everyone's responses were helpful, and this is exactly what I was looking for. Thank you. -- Chris Gorski - http://www.cgorski.org ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners