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 RAA24438; Wed, 19 Nov 2003 17:44:14 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 RAA23585 for ; Wed, 19 Nov 2003 17:44:13 +0100 (MET) Received: from herd.plethora.net (herd.plethora.net [205.166.146.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hAJGiC124479 for ; Wed, 19 Nov 2003 17:44:12 +0100 (MET) Received: from bhurt.plethora.net (bhurt.plethora.net [205.166.146.49]) by herd.plethora.net (8.11.6/8.10.1) with ESMTP id hAJGi6C13856; Wed, 19 Nov 2003 10:44:06 -0600 (CST) Date: Wed, 19 Nov 2003 11:43:38 -0600 (CST) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: skaller cc: Martin Berger , Caml Mailing List Subject: Re: [Caml-list] GC and file descriptors In-Reply-To: <1069248814.23700.81.camel@pelican> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 mli:01 foo:01 quux:01 baz:01 descriptors:01 interfaces:01 nov:01 signatures:02 exception:02 explicit:03 wrote:03 exported:03 exported:03 types:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On 20 Nov 2003, skaller wrote: > So either you give up explicit interfaces (mli files, > signatures, etc) or you have to have an extension > to the type system terms which allows you to state the > exception spec. I'd consider this a bonus :-). There are two obvious ways you could do this: 1) introduce a new keyword 'public'. Only types and values declared public are exported, everything else is considered internal to the file. So you could have: type public foo = This | That ;; (* exported *) type bar = Which | What ;; (* not exported *) let quux = ... ;; (* not exported *) let public baz = ... ;; (* exported *) 2) introduce a new keyword 'private'. Everything except those types and values marked private is exported. Note that we're breaking working code here. -- "Usenet is like a herd of performing elephants with diarrhea -- massive, difficult to redirect, awe-inspiring, entertaining, and a source of mind-boggling amounts of excrement when you least expect it." - Gene Spafford Brian ------------------- 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