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 SAA26928; Thu, 3 Jul 2003 18:18:11 +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 SAA27660 for ; Thu, 3 Jul 2003 18:18:10 +0200 (MET DST) Received: from newext.lri.fr (ext.lri.fr [129.175.15.4]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h63GI9f08286 for ; Thu, 3 Jul 2003 18:18:09 +0200 (MET DST) Received: from serveur-mail.lri.fr (serveur-mail [129.175.8.90]) by newext.lri.fr (8.12.9/jtpda-5.4) with ESMTP id h63GBBNS004383 for ; Thu, 3 Jul 2003 18:11:11 +0200 (MEST) Received: from pc8-119.lri.fr (pc8-119 [129.175.8.119]) by serveur-mail.lri.fr (8.11.6p2/jtpda-5.3.2) with ESMTP id h63GBB120697 for ; Thu, 3 Jul 2003 18:11:11 +0200 (MEST) Received: from localhost ([127.0.0.1]) by pc8-119.lri.fr with esmtp (Exim 3.36 #1 (Debian)) id 19Y6fv-00068d-00 for ; Thu, 03 Jul 2003 18:11:11 +0200 Date: Thu, 3 Jul 2003 18:11:10 +0200 (MEST) From: Julien Signoles To: caml-list@inria.fr Subject: [Caml-list] variant and functor Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailScanner: Found to be clean X-Spam: no; 0.00; signoles:01 lri:01 functor:01 val:01 struct:01 foo:01 mcvoy:01 sig:01 int:01 variant:02 module:03 abstract:03 let:04 cheers:06 assumption:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi list, I have the following functor : module Make(A : sig type a val f : a -> int end) = struct type t = [ A.a | `B ] (* impossible : A.a is abstract and not a variant *) let foo = function | #A.a as a -> A.f a (* no assumption about the tags of A.a *) | `B -> 0 end I'd like to know if it is possible to describe A.a as a variant type without write its tags. Cheers, Julien Signoles. -- mailto : Julien.Signoles@lri.fr ; http : www.lri.fr/~signoles "In theory, practice and theory are the same, but in practice they are different" (Larry McVoy) ------------------- 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