From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p2IF1X1j021078 for ; Fri, 18 Mar 2011 16:01:33 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlYEABIQg01V2gB5h2dsb2JhbACmAQEBCgsJHSXCYA2FVgSQTA X-IronPort-AV: E=Sophos;i="4.63,205,1299452400"; d="scan'208";a="103038889" Received: from emailfrontal2.citycable.ch ([85.218.0.121]) by mail1-smtp-roc.national.inria.fr with SMTP; 18 Mar 2011 16:01:27 +0100 X-Alinto-smtpauth-localdomain: Yes Received: from seldon (unknown [85.218.93.111]) (Authenticated sender: guillaume.yziquel@citycable.ch) by emailfrontal2.citycable.ch (Postfix) with ESMTPA id 2C4B28347B1; Fri, 18 Mar 2011 16:01:26 +0100 (CET) Received: from yziquel by seldon with local (Exim 4.72) (envelope-from ) id 1Q0b9Y-0003qs-68; Fri, 18 Mar 2011 15:59:48 +0100 Date: Fri, 18 Mar 2011 15:59:48 +0100 From: Guillaume Yziquel To: Joel Reymont Cc: caml-list@inria.fr Message-ID: <20110318145948.GN22969@localhost> References: <5290B182-B882-4C47-B6EE-8EABDBB7A8A9@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <5290B182-B882-4C47-B6EE-8EABDBB7A8A9@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p2IF1X1j021078 Subject: Re: [Caml-list] errors compiling thrift-generated code Le Friday 18 Mar 2011 à 15:29:12 (+0100), Joel Reymont a écrit : > Folks, > > Any suggestions on what's going on here? > > https://gist.github.com/876154 > > The error is at the very bottom. > > This is code auto-generated by Apache Thrift. > > Thanks, Joel Can't say for sure, but I managed to have similar code compiling fine: https://github.com/yziquel/OCaml-MPI/blob/master/datatype.p4.ml#L208 https://github.com/yziquel/OCaml-MPI/blob/master/datatype.p4.sig.mli#L45 I'd say: Try building class types first. But it's only a vague impression I have when I try to recall how my code was built. Perhaps changing the class in your .mli to have the method copy of type 'self? The basic idea is that if you inherit from the class document, 'self then denotes the derived class. That may be it. To my knowledge, there isn't really a way to have classes as 'final' other than to use a type my_class = private < some oo stuff here > construct, where you can substitute 'self (which does not have any meaning in such a type declaration) by my_class. But it's all rather vague memories. -- Guillaume Yziquel