From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 0FA25BB84 for ; Tue, 10 Feb 2009 19:24:18 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsBABBVkUnCpx6wmWdsb2JhbACUSQEBAQEBCAsKBxG/N4QaBg X-IronPort-AV: E=Sophos;i="4.38,187,1233529200"; d="scan'208";a="22773746" Received: from smtpmin.univ-orleans.fr (HELO min.univ-orleans.fr) ([194.167.30.176]) by mail3-smtp-sop.national.inria.fr with ESMTP; 10 Feb 2009 19:24:17 +0100 Received: from smtps.univ-orleans.fr (localhost [127.0.0.1]) by min.univ-orleans.fr (Postfix) with ESMTP id 3F2AD12B56A; Tue, 10 Feb 2009 19:24:17 +0100 (CET) Received: from [192.168.0.1] (lau18-1-82-246-197-195.fbx.proxad.net [82.246.197.195]) by smtps.univ-orleans.fr (Postfix) with ESMTP id 4B8BD36E60; Tue, 10 Feb 2009 19:24:20 +0100 (CET) Subject: Re: [Caml-list] Hiding private types From: David Rajchenbach-Teller To: Martin Jambon Cc: OCaml In-Reply-To: <4991C1DF.8010503@ens-lyon.org> References: <1234286066.6457.35.camel@Blefuscu> <4991C1DF.8010503@ens-lyon.org> Content-Type: text/plain; charset=utf-8 Date: Tue, 10 Feb 2009 19:24:29 +0100 Message-Id: <1234290269.6457.56.camel@Blefuscu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; ens-lyon:01 0100,:01 sig:01 sig:01 val:01 val:01 struct:01 mli:01 mli:01 univ-orleans:01 lifo:01 2009:98 wrote:01 abstract:01 caml-list:01 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.