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=1.0 required=5.0 tests=AWL,DNS_FROM_SECURITYSAGE 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 06C87BBAF for ; Mon, 3 Nov 2008 22:35:51 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AioDAMv9DknAXQImgWdsb2JhbACUFQEBFiK3NoNS X-IronPort-AV: E=Sophos;i="4.33,538,1220220000"; d="scan'208";a="18817348" Received: from discorde.inria.fr ([192.93.2.38]) by mail3-smtp-sop.national.inria.fr with ESMTP; 03 Nov 2008 22:35:50 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id mA3LZoFa030442 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 3 Nov 2008 22:35:50 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar0CAFT9DknCpx6wi2dsb2JhbACUFQEBAQoLChi3KINS X-IronPort-AV: E=Sophos;i="4.33,538,1220220000"; d="scan'208";a="19527737" Received: from smtpmin.univ-orleans.fr (HELO min.univ-orleans.fr) ([194.167.30.176]) by mail1-smtp-roc.national.inria.fr with ESMTP; 03 Nov 2008 22:35:50 +0100 Received: from smtps.univ-orleans.fr (localhost [127.0.0.1]) by min.univ-orleans.fr (Postfix) with ESMTP id 3A23412B48A for ; Mon, 3 Nov 2008 22:35:50 +0100 (CET) Received: from [192.168.0.12] (ras75-4-82-235-58-110.fbx.proxad.net [82.235.58.110]) by smtps.univ-orleans.fr (Postfix) with ESMTP id 183DC36E60 for ; Mon, 3 Nov 2008 22:35:54 +0100 (CET) Subject: Hiding a public module/type? From: David Teller To: OCaml Content-Type: text/plain Date: Mon, 03 Nov 2008 22:35:57 +0100 Message-Id: <1225748157.6328.105.camel@Blefuscu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 490F6EB6.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; univ-orleans:01 mli:01 mli:01 val:01 univ-orleans:01 lifo:01 liquidations:98 int:01 int:01 define:02 expression:02 expression:02 defined:02 defined:02 module:03 Dear list, In order to simplify the error messages for users of my library, I'd like to hide some type aliasing. I have the following: (*** module [Inner], defined in inner.mli ***) type t (*** module [Outer], defined in outer.mli ***) type t = Inner.t val f : t -> t Now, module [Inner] is only useful to define the library and shouldn't be visible from the outside. Unfortunately, for the moment, whenever a client makes a type error involving [f], the error message looks like # f 5;; ^ This expression has type int but is used with type Outer.t = Inner.t Is there a simple way of turning this error message into This expression has type int but is used with type Outer.t ? Thanks, David -- David Teller-Rajchenbach Security of Distributed Systems http://www.univ-orleans.fr/lifo/Members/David.Teller Angry researcher: French Universities need reforms, but the LRU act brings liquidations.