From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p2IEm0Xu019635 for ; Fri, 18 Mar 2011 15:48:00 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmUDAI8Mg03RVdi2kGdsb2JhbACERJQAMYxvCBUBAQEJCQ0HFAQhp2CKBjyCHoUCL4hbAQEDBYEig0V3BIxjhnaCCDo X-IronPort-AV: E=Sophos;i="4.63,205,1299452400"; d="scan'208";a="94407190" Received: from mail-qy0-f182.google.com ([209.85.216.182]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 18 Mar 2011 15:47:58 +0100 Received: by qyk27 with SMTP id 27so3488602qyk.6 for ; Fri, 18 Mar 2011 07:47:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=/Kr25JKd+FweEfIqQl9BUWtrWRqXYqYn4Ws6TJ9+l/c=; b=GpceFEW9dP92t31FUWIjUWn1MRR+T3PCaFHvKTDNXLGC3HEy1h03+szH62hMDxhWph CsoxZet5tymwrGQgP3lfOcj/UamOEkwc6dIjSB1QvKUiS5Dv9R4UlDIoyC3BJuuZRHzZ Nz3lCBo0JtJgO17QSXKiaXUkgrDngiPi0yEJA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=dLirWLrEU8htS6PDOmi/WyrhPjecxVtQHAK26BiDOehqMElC8bpoYUEC/Ka5n7ERj5 Y3MkZhTk9z0zlBobrC/675etrbF4y4tJlhnONcKerIjxsuQe+COQYJjC8HLOFTTPwbg1 pH3G6u+v17BauKBViwIFoiWO6Nn6T2q3vmxTU= MIME-Version: 1.0 Received: by 10.229.141.206 with SMTP id n14mr1055918qcu.41.1300459677431; Fri, 18 Mar 2011 07:47:57 -0700 (PDT) Received: by 10.229.87.129 with HTTP; Fri, 18 Mar 2011 07:47:57 -0700 (PDT) In-Reply-To: <5290B182-B882-4C47-B6EE-8EABDBB7A8A9@gmail.com> References: <5290B182-B882-4C47-B6EE-8EABDBB7A8A9@gmail.com> Date: Fri, 18 Mar 2011 10:47:57 -0400 Message-ID: From: Niki Yoshiuchi To: caml-list@inria.fr Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p2IEm0Xu019635 Subject: Re: [Caml-list] errors compiling thrift-generated code Apologies if you receive this twice, I accidentally hit reply instead of reply all. The problem appears to be related to the problem that self is dynamically bound at invocation (as objects can be extended by subclasses). The details are outlined here: http://caml.inria.fr/pub/docs/manual-ocaml/manual005.html#toc20 You'll noticed that if you declare an object with a reference to self its type is: class myclass : object ('a) .... : ;a end In other words, self is of type 'a and not type myclass. The easiest way to fix your problem is to change the interface so that: method copy : document becomes: method copy : 'a You should also file a bug report with the Thrift developers. -Niki Yoshiuchi On Fri, Mar 18, 2011 at 10:29 AM, Joel Reymont wrote: > 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 > > -------------------------------------------------------------------------- > - for hire: mac osx device driver ninja, kernel extensions and usb drivers > ---------------------+------------+--------------------------------------- > http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont > ---------------------+------------+--------------------------------------- > > > > > -- > Caml-list mailing list.  Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > >