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=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 34B51BC6B for ; Fri, 7 Sep 2007 23:04:36 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.232]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l87L4Zrf018035 for ; Fri, 7 Sep 2007 23:04:35 +0200 Received: by nz-out-0506.google.com with SMTP id z3so378538nzf for ; Fri, 07 Sep 2007 14:04:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=+2eNHob/n9xJ3LhT6QjMnVTLd8t4RuV6B7PJQIhC9OA=; b=X/3avLbnbV5Coidw3A0T7bHvnlUxB2qKUZCy72Sy8lrvS0Fpqd61lbiAdmNKIsMY69BcobCPdfFfcabJVOVAm0D2PlNiCVjRPJWpfcztlyv/0mK6YDcYFNAdyi2W+HbgzJIx4jBgOtE4n0hmblHPB9mJFHxwf8aXizKmUsfFmE4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=ZDfwgtdeP6XH+AZ4VlzmYGvXTfKV6GGp0fbBACxmQGVUWDZDBHUxnvZ1dLiYqp2kWMMiDLI0wgv00LhhfrmgUYkIylP4tgdqH4nOG9EOEZa6QNVKRxWWbfPiVorxFpayscMkkOsKBDJR+fWbNElQjOxS3/Okmc1ordiie06xPYc= Received: by 10.114.200.2 with SMTP id x2mr2059048waf.1189199074184; Fri, 07 Sep 2007 14:04:34 -0700 (PDT) Received: by 10.114.203.16 with HTTP; Fri, 7 Sep 2007 14:04:33 -0700 (PDT) Message-ID: <875c7e070709071404q641d0ec0rbacbb07763a5a4bb@mail.gmail.com> Date: Fri, 7 Sep 2007 17:04:33 -0400 From: "Chris King" To: "Caml List" Subject: Oddness concerning private variants in 3.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-j-chkmail-Score: MSGID : 46E1BCE3.001 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46E1BCE3.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; variants:01 mli:01 sig:01 struct:01 mli:01 variant:02 compiling:02 compiling:02 inferred:02 inferred:02 defined:02 defined:02 match:02 match:02 blank:97 Hi, I just took the leap to 3.10 and encountered some strangeness compiling my project with it: The implementation input_test.ml does not match the interface (inferred signature): Type declarations do not match: type button = FrGui.button is not included in type button = FrGui.button#row First, I don't understand how a module doesn't match its inferred signature. Strangely, creating a blank input_test.mli file gets around this error. Second, the type button (which is a private variant) isn't even defined in input_test.ml, it's defined in a module opened by it. I tried coming up with some minimal test cases and found even more interesting results: Compiling this: module A: sig type t = [ `A | `B ] end = struct type t = private [> `A ] end results in the error: Type declarations do not match: type t = private [> `A ] is not included in type t = [ `A | `B ] But compiling this: type t = [ `A | `B ] with this .mli file: type t = private [> `A ] works fine. What is going on here? I haven't yet been able to reproduce the error in my project using a minimal test case but I will post it when I do. Thanks, Chris