From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=DNS_FROM_RFC_POST, HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 52168BBAF for ; Mon, 20 Apr 2009 22:46:01 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqYEAF987ElIDvb2a2dsb2JhbACCIDGTLD8NCgsHEASrD4EJjnYBAwEDg3oG X-IronPort-AV: E=Sophos;i="4.40,219,1238968800"; d="scan'208";a="26540588" Received: from ag-out-0708.google.com ([72.14.246.246]) by mail3-smtp-sop.national.inria.fr with ESMTP; 20 Apr 2009 22:45:46 +0200 Received: by ag-out-0708.google.com with SMTP id 31so734137aga.9 for ; Mon, 20 Apr 2009 13:45:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=eljDfIceIgKv61igj7os+/v6Eo/k7KqK4zvyOxsLHq0=; b=oHKQ0yemUf0fM3qzqLFGBnJ90enV6zjXzgNN/XJR8s7bVAuo+K9IOkpwdjzbnXyu/a 8YVjEJ5V34HK83QMYo8IJdVpIHmQf1leV+3glJxDElMf14oZ7HT/6bm+uxmLHDaP+uPU Fe76tmoZWfFe5cXXMkD/fKKPtJlqDp1wr7DI4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ttSDgvN/ehffCT7soSphMVBkLB9/U5h49/BwpifYXPWopXnBmA+4Tr4+WsuLCmGGW6 xhmLZAZHiyS7h2PiKeg9ZQeG6+pBgaqRkA36YLsYgtXkUK+rjCybsUxG0Mxatgy7NELF IhZR8Joo+K3zzONSQgi8kvlH/AciDTtwyYQSA= MIME-Version: 1.0 Received: by 10.151.42.12 with SMTP id u12mr1911527ybj.223.1240260345423; Mon, 20 Apr 2009 13:45:45 -0700 (PDT) Date: Mon, 20 Apr 2009 22:45:45 +0200 Message-ID: Subject: Interpretation of an error message "type ('a, 'b) t should be ('a, 'c) t" in a signature? From: Jean Balthazar To: caml-list@inria.fr Content-Type: multipart/alternative; boundary=00151751149a5166fe0468029d54 X-Spam: no; 0.00; sig:01 sig:01 W8:98 caml-list:01 caml-list:01 mly:01 define:02 define:02 archives:02 archives:02 W4:96 module:03 module:03 derived:05 derived:05 --00151751149a5166fe0468029d54 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Dear caml-list, I try to define the signature of three interdependant classes that should then be derived and completed for various implementation. The code below causes the strange error messsage: File "tmp.ml", line 4, characters 7-92: In the definition of job, type ('a, 'b) batch should be ('a, 'c) batch Can you explain what is wrong with this signature? I was unable to find an answer to a similar problem in the archives. Thank you very much. Jean ---------------------------------------------------------------------------- module type JOB = sig type ('a, 'b) batch = private < build : 'a job -> ('a priority * 'a) list -> 'b job; .. > and 'b priority = private < next : 'b priority; .. > and 'a job = private < create_batch : 'c.('a -> 'c) -> ('a, 'c) batch; .. > end --00151751149a5166fe0468029d54 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Dear caml-list,

I try to define the signature of three interdependan= t classes that should then be derived and completed for various implementat= ion. The code below causes the strange error messsage:

=A0=A0=A0=A0 = =A0 =A0 File "tmp.ml", line 4, char= acters 7-92:
=A0=A0=A0=A0=A0=A0=A0=A0 In the definition of job, type ('a, 'b) ba= tch should be ('a, 'c) batch

Can you explain what is wrong w= ith this signature?
I was unable to find an answer to a similar problem = in the archives.

Thank you very much.
Jean

-----------------------------------= -----------------------------------------
=A0
module type JOB =3D
= sig

=A0 type ('a, 'b) batch =3D=A0 private < build : '= ;a job -> ('a priority * 'a) list -> 'b job; .. >
=A0 and 'b priority =3D private < next : 'b priority;=A0 ..=A0 &= gt;
=A0 and 'a job =3D=A0 private < create_batch : 'c.('a= -> 'c) -> ('a, 'c) batch; ..=A0 >

end

<= br>
--00151751149a5166fe0468029d54--