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 p2IEon7J020017 for ; Fri, 18 Mar 2011 15:50:49 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai4CAMcNg03RVaE2kGdsb2JhbAClZAgVAQEBCQkNBxQEIYhNnyCKQoIehQIviFsBAQMFhV4EjGODT3SEOzo X-IronPort-AV: E=Sophos;i="4.63,205,1299452400"; d="scan'208";a="103037918" Received: from mail-fx0-f54.google.com ([209.85.161.54]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 18 Mar 2011 15:50:43 +0100 Received: by fxm11 with SMTP id 11so5860166fxm.27 for ; Fri, 18 Mar 2011 07:50:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer; bh=tIOXyKtg/V9eTbcNbAO53kp7RyOmnX+xf7g3LF6dvOg=; b=oufqUsDg/wVbWeJGAwJst3Ysq/UORjKUleVK/puQHKuiSyh7D57i64LThOizIkKaE3 lSkbZedg4w240tg6i3EUIg3uEeX3MqAQhXoPKg2ybTaIgztFdl726y2W8dmlW9ZSHzYp 7K9QGJXAyKTfog1k+M2PVu6QJ5FhAnZD66WyM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=larilst3m499BzRSvOG3Q4T9g8ehCNIIQaky64ZYVlIbyaXYoKoGdl6KpRTOsPUTkN 3L+w9N85Y/EItb4wrprt4JoTc8/5JqDtpwDb2gkpbkhtfokSbwkVDSNIIgUl4qOJc+84 pkLTTvv+w8XRh9H0DhQszEnsU8nNBSADSu78w= Received: by 10.223.77.19 with SMTP id e19mr1372287fak.36.1300459816422; Fri, 18 Mar 2011 07:50:16 -0700 (PDT) Received: from [10.0.1.36] ([87.54.60.37]) by mx.google.com with ESMTPS id n7sm1415457fam.35.2011.03.18.07.50.14 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Mar 2011 07:50:15 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Joel Reymont In-Reply-To: Date: Fri, 18 Mar 2011 15:50:13 +0100 Cc: caml-list@inria.fr Content-Transfer-Encoding: 7bit Message-Id: <4AF1D4F6-2AA4-419C-98D7-F6D4EEE97441@gmail.com> References: <5290B182-B882-4C47-B6EE-8EABDBB7A8A9@gmail.com> To: Niki Yoshiuchi X-Mailer: Apple Mail (2.1082) Subject: Re: [Caml-list] errors compiling thrift-generated code > 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 ---------------------+------------+---------------------------------------