From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 598A7BC57 for ; Tue, 21 Sep 2010 14:16:15 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoUEAGY+mEyNTDBjgWdsb2JhbACUM410FQEBFiIiwi2FQQSKOA X-IronPort-AV: E=Sophos;i="4.56,399,1280700000"; d="scan'208";a="57758806" Received: from os.inf.tu-dresden.de ([141.76.48.99]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 21 Sep 2010 14:16:14 +0200 Received: from [2002:8d4c:3001:48:222:68ff:fe19:71d] (helo=blau.inf.tu-dresden.de) by os.inf.tu-dresden.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) id 1Oy1ld-0002gn-NA for caml-list@inria.fr; Tue, 21 Sep 2010 14:16:13 +0200 Received: from tews by blau.inf.tu-dresden.de with local (Exim 4.72) (envelope-from ) id 1Oy1lc-0001Xk-Nt for caml-list@inria.fr; Tue, 21 Sep 2010 14:16:12 +0200 From: Hendrik Tews MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19608.41484.202892.641777@blau.inf.tu-dresden.de> Date: Tue, 21 Sep 2010 14:16:12 +0200 To: caml-list@inria.fr Subject: difference of [< `A of & int] and [< `A of int] ? X-Mailer: VM 8.1.0 under 23.2.1 (i486-pc-linux-gnu) X-Spam: no; 0.00; hendrik:01 tews:01 tews:01 camlp:01 ctyp:01 ctyp:01 camlp:01 bug:01 hendrik:01 tu-dresden:01 partial:01 constructor:01 constraint:01 constraint:01 int:01 Hi, I am trying to grasp the camlp4 constructor for types TyOfAmp, which is declared as | TyOfAmp of loc and ctyp and ctyp (* t of & t *) in camlp4/Camlp4/Camlp4Ast.partial.ml. It is used in the ast of ``[< `A of & int]''. Can somebody explain the meaning of [< `A of & int]? What is the difference between [< `A of & int] and [< `A of int] ? And why does type 'a t = [< `A of & int] as 'a produce the weird error File "test/x.ml", line 1, characters 0-1: Error: The implementation test/x.ml does not match the interface (inferred signature): Type declarations do not match: type 'a t = 'a constraint 'a = [< `A of & int ] is not included in type 'a t = 'a constraint 'a = [< `A of & int ] ? Is this a bug or a feature? Bye, Hendrik