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 TAA20239; Wed, 26 Jun 2002 19:16:34 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA19959 for ; Wed, 26 Jun 2002 19:16:34 +0200 (MET DST) Received: from mel-rto2.wanadoo.fr (smtp-out-2.wanadoo.fr [193.252.19.254]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g5QHGX511524 for ; Wed, 26 Jun 2002 19:16:33 +0200 (MET DST) Received: from mel-rta10.wanadoo.fr (193.252.19.193) by mel-rto2.wanadoo.fr (6.5.007) id 3D1838B60011E135 for caml-list@inria.fr; Wed, 26 Jun 2002 19:16:33 +0200 Received: from warp (217.128.142.232) by mel-rta10.wanadoo.fr (6.5.007) id 3D11E5E5003574FF for caml-list@inria.fr; Wed, 26 Jun 2002 19:16:33 +0200 Message-ID: <009401c21d35$12334fa0$a500a8c0@warp> From: "Nicolas Cannasse" To: "OCaml" Subject: [Caml-list] Exported Types Date: Wed, 26 Jun 2002 19:15:29 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I got some problem using an "exported type" ( shared between modules ). I know that I can avoid them by using polymorphic types but that'ld be nicer without them. I would also like of course to keep the files separated. Here's a sample : -- a.mli --- type t (* exported *) -- b.mli -- type t val f : A.t -> t (* module B is using the type A.t but won't directly call any A functions *) -- b.ml -- type t = A.t (* quite stupid , but that's a sample ! *) let f x = x -- a.ml -- type t = int;; ignore( B.f (0:t) ) --- (* This expression has type t = int but is here used with type A.t *) I think this problem is quite standard, but I didn't find any clue on the www Any help will be welcomed Nicolas Cannasse ------------------- 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