caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Joel Reymont <joelr1@gmail.com>
To: Niki Yoshiuchi <aplusbi@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] errors compiling thrift-generated code
Date: Fri, 18 Mar 2011 15:50:13 +0100	[thread overview]
Message-ID: <4AF1D4F6-2AA4-419C-98D7-F6D4EEE97441@gmail.com> (raw)
In-Reply-To: <AANLkTikj278tWdB284C7E7ZQ4-PaynNCk8eCzf=QXn-0@mail.gmail.com>


> The easiest way to fix your problem is to change the interface so that:
> 
>    method copy : document
> 
> becomes:
> 
>    method copy : 'a

I changed copy in the mli but it doesn't seem to work.

Error: The implementation src/Hello_types.ml
       does not match the interface src/hello_types.cmi:
       Class declarations do not match:
         class document :
           object ('a)
             val mutable _docname : string option
             val mutable _page : int option
             val mutable _username : string option
             method copy : 'a
             method get_docname : string option
             method get_page : int option
             method get_username : string option
             method grab_docname : string
             method grab_page : int
             method grab_username : string
             method reset_docname : unit
             method reset_page : unit
             method reset_username : unit
             method set_docname : string -> unit
             method set_page : int -> unit
             method set_username : string -> unit
             method unset_docname : unit
             method unset_page : unit
             method unset_username : unit
             method write : Thrift.Protocol.t -> unit
           end
       does not match
         class document :
           object
             method copy : 'a
             method get_docname : string option
             method get_page : int option
             method get_username : string option
             method grab_docname : string
             method grab_page : int
             method grab_username : string
             method reset_docname : unit
             method reset_page : unit
             method reset_username : unit
             method set_docname : string -> unit
             method set_page : int -> unit
             method set_username : string -> unit
             method unset_docname : unit
             method unset_page : unit
             method unset_username : unit
             method write : Thrift.Protocol.t -> unit
           end
       The method copy has type
         < copy : 'a; get_docname : string option; get_page : int option;
           get_username : string option; grab_docname : string;
           grab_page : int; grab_username : string; reset_docname : unit;
           reset_page : unit; reset_username : unit;
           set_docname : string -> unit; set_page : int -> unit;
           set_username : string -> unit; unset_docname : unit;
           unset_page : unit; unset_username : unit;
           write : Thrift.Protocol.t -> unit; .. >
         as 'a
       but is expected to have type 'b. 'b
Command exited with code 2.


--------------------------------------------------------------------------
- for hire: mac osx device driver ninja, kernel extensions and usb drivers
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------




  parent reply	other threads:[~2011-03-18 14:50 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 [this message]
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=4AF1D4F6-2AA4-419C-98D7-F6D4EEE97441@gmail.com \
    --to=joelr1@gmail.com \
    --cc=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).