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 PAA15299; Thu, 13 Sep 2001 15:52: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 PAA14958 for ; Thu, 13 Sep 2001 15:52:27 +0200 (MET DST) Received: from indigo.recherche.enac.fr (indigo.recherche.enac.fr [195.220.158.66]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f8DDqQP18844 for ; Thu, 13 Sep 2001 15:52:27 +0200 (MET DST) Received: from mauve.recherche.enac.fr (mail@mauve.recherche.enac.fr [10.31.3.2]) by indigo.recherche.enac.fr (8.8.6 (PHNE_14041)/8.6.11) with ESMTP id PAA09009 for ; Thu, 13 Sep 2001 15:52:26 +0200 (METDST) Received: from sepia.recherche.enac.fr ([10.31.1.82]) by mauve.recherche.enac.fr with smtp (Exim 3.31 #1 (Debian)) id 15hWun-0008Kr-00 for ; Thu, 13 Sep 2001 15:52:25 +0200 Received: by sepia.recherche.enac.fr (sSMTP sendmail emulation); Thu, 13 Sep 2001 15:52:25 +0200 Date: Thu, 13 Sep 2001 15:52:25 +0200 From: Pascal Brisset To: caml-list@inria.fr Subject: [Caml-list] renaming a type Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII Message-Id: Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I want to alias a type outside a module in order to use it easily without opening the module. For example sepia[211]% ocaml Objective Caml version 3.01 # module M = struct type t = T end;; module M : sig type t = T end # type t' = M.t = T;; type t' = M.t = T # T = M.T;; - : bool = true Unfortunately it does not work is I instantiate a polymorphic type with the same idea: # module M = struct type 'a t = T end;; module M : sig type 'a t = T end # type t' = int M.t = T;; ^^^^^^^^^^^^^^^^ The variant or record definition does not match that of type int M.t Is there a workaround to get the expected result: writing, without prefixing the module name, values of a type defined in a module and aliased outside ? --Pascal ------------------- 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