From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 35A61BC0A for ; Fri, 16 Mar 2007 11:43:57 +0100 (CET) Received: from smtp.uibk.ac.at (lmr1.uibk.ac.at [138.232.1.142]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2GAhtPg014432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 16 Mar 2007 11:43:56 +0100 Received: from smc.uibk.ac.at (smc.uibk.ac.at [138.232.1.226] c703350@smc.uibk.ac.at) by smtp.uibk.ac.at (8.13.8/8.13.1/F1) with ESMTP id l2GAhsvY026357 for ; Fri, 16 Mar 2007 11:43:54 +0100 Received: from smc.uibk.ac.at (localhost [127.0.0.1] c703350@smc.uibk.ac.at) by smc.uibk.ac.at (8.13.8+Sun/uibk) with ESMTP id l2GAhsfL017699 for ; Fri, 16 Mar 2007 11:43:54 +0100 (MET) Received: (from c703350@localhost) by smc.uibk.ac.at (8.13.8+Sun/8.13.8/Submit) id l2GAhsfg017698 for caml-list@yquem.inria.fr; Fri, 16 Mar 2007 11:43:54 +0100 (MET) Date: Fri, 16 Mar 2007 11:43:54 +0100 From: Christian Sternagel To: caml-list@yquem.inria.fr Subject: type constraints involving variant types Message-ID: <20070316104354.GA3202@pc6197-c703.uibk.ac.at> Mail-Followup-To: caml-list@yquem.inria.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i X-Scanned-By: MIMEDefang 2.58 at uibk.ac.at on 138.232.1.140 X-Miltered: at concorde with ID 45FA74EB.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; sig:01 sig:01 syntax:01 cheers:01 variant:02 variant:02 constraints:03 constraints:03 types:03 types:03 module:03 module:03 yields:12 end:12 end:12 Is it possible to give type constraints involving variant types? If there is e.g. module type A = sig type t = A of 'a | B of 'b end module type B = sig module A : A end Can I then do something like module type C = sig module B : B module A : A with type t = B.A.t = A of 'a | B of 'b end The above yields a syntax error, but there should be a way of doing that or not? cheers christian