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 NAA05952; Wed, 18 Jun 2003 13:07:12 +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 NAA05923 for ; Wed, 18 Jun 2003 13:07:10 +0200 (MET DST) Received: from mail0.epfl.ch (mail0.epfl.ch [128.178.50.57]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id h5IB79T18192 for ; Wed, 18 Jun 2003 13:07:10 +0200 (MET DST) Received: (qmail 17013 invoked from network); 18 Jun 2003 11:07:09 -0000 Received: from lamppc31.epfl.ch (128.178.154.39) by mail0.epfl.ch with SMTP; 18 Jun 2003 11:07:09 -0000 Subject: Re: [Caml-list] type and modules... (sig mismatch again) From: Damien Pous To: caml-list@inria.fr In-Reply-To: <20030618104059.GA25514@anu.edu.au> References: <20030618104059.GA25514@anu.edu.au> Content-Type: text/plain; charset=ISO-8859-15 Message-Id: <1055934427.14853.14.camel@lamppc31.epfl.ch> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 18 Jun 2003 13:07:07 +0200 Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; damien:01 ens-lyon:01 caml-list:01 mismatch:01 pietro:01 abate:01 inferred:01 infer:01 ecrit:01 variants:01 sig:01 polymorphic:01 modules:02 module:03 constructor:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Le mer 18/06/2003 à 12:41, Pietro Abate a écrit : > my daily question :-)) my daily answer ! maybe I'm wrong (if so, please correct me) but I believe the module is built and its signature is inferred, and then this signature is matched against the one you provide (A with ...) so the signature you provide isn't used to infer the types... furthermore the hidden type constructor A for t1_t is "hidden for ever", that is, you can't use it even under type constraint : '(A 5 : t1_t)' should not be accepted I don't know what you plan to do with this, but maybe you should look at the polymorphic variants : type t1 = [`A] type t2 = [t1 | `B] ... Cheers, damien ------------------- 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