caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Guillaume Yziquel <guillaume.yziquel@citycable.ch>
To: Joel Reymont <joelr1@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] errors compiling thrift-generated code
Date: Fri, 18 Mar 2011 15:59:48 +0100	[thread overview]
Message-ID: <20110318145948.GN22969@localhost> (raw)
In-Reply-To: <5290B182-B882-4C47-B6EE-8EABDBB7A8A9@gmail.com>

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


  parent reply	other threads:[~2011-03-18 15:01 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 ` [Caml-list] " Niki Yoshiuchi
2011-03-18 14:52   ` 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 [this message]
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=20110318145948.GN22969@localhost \
    --to=guillaume.yziquel@citycable.ch \
    --cc=caml-list@inria.fr \
    --cc=joelr1@gmail.com \
    /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).