caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Niki Yoshiuchi <aplusbi@gmail.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] errors compiling thrift-generated code
Date: Fri, 18 Mar 2011 10:47:57 -0400	[thread overview]
Message-ID: <AANLkTi=UFFPf7KG77GLh4MtedXZR-0mqdr-SF3xJ_LqQ@mail.gmail.com> (raw)
In-Reply-To: <5290B182-B882-4C47-B6EE-8EABDBB7A8A9@gmail.com>

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 <joelr1@gmail.com> 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
>
>


  parent reply	other threads:[~2011-03-18 14:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-18 14:29 Joel Reymont
2011-03-18 14:45 ` [Caml-list] " Joel Reymont
2011-03-18 14:47 ` Niki Yoshiuchi [this message]
2011-03-18 14:52   ` [Caml-list] " Joel Reymont
     [not found] ` <AANLkTikj278tWdB284C7E7ZQ4-PaynNCk8eCzf=QXn-0@mail.gmail.com>
2011-03-18 14:50   ` Joel Reymont
2011-03-18 14:59 ` Guillaume Yziquel
2011-03-18 15:06   ` Joel Reymont

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=UFFPf7KG77GLh4MtedXZR-0mqdr-SF3xJ_LqQ@mail.gmail.com' \
    --to=aplusbi@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).