Version française
Home     About     Download     Resources     Contact us    
Browse thread
Hiding private types
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Rajchenbach-Teller <David.Teller@e...>
Subject: Re: [Caml-list] Hiding private types
On Tue, 2009-02-10 at 19:05 +0100, Martin Jambon wrote:
> (* IO's signature *)
> module type A_sig =
> sig
>   type t
>   val add : t -> t -> t
>   val create : unit -> t
> end
>(* Extlib.IO *)
> module A : A_sig =
> struct
>   type t = int
>   let add = ( + )
>   let create () = 1
> end
> 
Thanks.

I can probably do that, if I find a nice way of 
* extracting the signature and contents from .mli files
* replacing every occurrence of the private types of IO.mli with an
abstract type
* replacing every occurrence of these types in modules which use
InnerIO.output with IO.output

Of course, if anyone can think of a simpler solution, I'm interested.

> I just hope it works for your problem.
> 
So do I, it's going to take some work just to reach a testable solution.

Thanks,
 David

> 
-- 
David Teller-Rajchenbach
 Security of Distributed Systems
  http://www.univ-orleans.fr/lifo/Members/David.Teller
   « Ce matin Un crétin A tué un chercheur. » (air connu)
   Latest News of French Research: System being liquidated. Researchers
angry.