Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] GC and file descriptors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Hurt <bhurt@s...>
Subject: Re: [Caml-list] GC and file descriptors
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