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 JAA00352; Mon, 10 Sep 2001 09:02:28 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA00197 for ; Mon, 10 Sep 2001 09:02:28 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f8A72PH25095; Mon, 10 Sep 2001 09:02:25 +0200 (MET DST) Received: (from fpottier@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA32707; Mon, 10 Sep 2001 09:02:25 +0200 (MET DST) Date: Mon, 10 Sep 2001 09:02:25 +0200 From: Francois Pottier To: Charles Martin Cc: caml-list@inria.fr Subject: Re: [Caml-list] opaque polymorphism Message-ID: <20010910090225.A32394@pauillac.inria.fr> Reply-To: Francois.Pottier@inria.fr References: <20010907183550.30294.qmail@web9207.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 1.0i In-Reply-To: <20010907183550.30294.qmail@web9207.mail.yahoo.com>; from joelisp@yahoo.com on Fri, Sep 07, 2001 at 11:35:50AM -0700 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello Charles, You can write: foo.ml: type ('a, 'b, 'c) internal_t = { ... } type ('a, 'c) t = ('a, , 'c) internal_t foo.mli: type ('a, 'c) t So ``hiding the polymorphism in 'b'' can be done, but you have to tell the compiler which internal type should be used instead of 'b, i.e. you have to choose . I guess the unit type will do in most situations. Hope this helps, -- François Pottier Francois.Pottier@inria.fr http://pauillac.inria.fr/~fpottier/ ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr