From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id F1A677EE51 for ; Sat, 13 Apr 2013 08:56:45 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of kakadu.hafanana@gmail.com) identity=pra; client-ip=74.125.82.47; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kakadu.hafanana@gmail.com"; x-sender="kakadu.hafanana@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of kakadu.hafanana@gmail.com designates 74.125.82.47 as permitted sender) identity=mailfrom; client-ip=74.125.82.47; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kakadu.hafanana@gmail.com"; x-sender="kakadu.hafanana@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wg0-f47.google.com) identity=helo; client-ip=74.125.82.47; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kakadu.hafanana@gmail.com"; x-sender="postmaster@mail-wg0-f47.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoMCAA4BaVFKfVIvjWdsb2JhbABQgzy5NIg1fQgWDgEBAQEHCwsJEgYkgh8BAQQBJxkBGx0BAwELBgUEBzshAQERAQUBHAYTCId5AQMJBp4sjC+Ce4QxChknDVmIfgEFDIw4glMHg0EDiH2FXoZEgWOBIYpUgzoWKYQzNw X-IPAS-Result: AoMCAA4BaVFKfVIvjWdsb2JhbABQgzy5NIg1fQgWDgEBAQEHCwsJEgYkgh8BAQQBJxkBGx0BAwELBgUEBzshAQERAQUBHAYTCId5AQMJBp4sjC+Ce4QxChknDVmIfgEFDIw4glMHg0EDiH2FXoZEgWOBIYpUgzoWKYQzNw X-IronPort-AV: E=Sophos;i="4.87,466,1363129200"; d="scan'208";a="13092912" Received: from mail-wg0-f47.google.com ([74.125.82.47]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 13 Apr 2013 08:56:45 +0200 Received: by mail-wg0-f47.google.com with SMTP id j13so838418wgh.2 for ; Fri, 12 Apr 2013 23:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=tHScqz2QQ8gRFKqxKvCeUQGKJhg+0Cbt0QiPcjtD1bw=; b=lKe3+DZM5Or7Pk9so7Ff5v0hWA+UKnP2RqDclI4hKuG3Z0AF/HOVsCCl4wI9eIG+78 /mrZ7MYFpDzIKIzy9qPk4e8fkTWX6rJJlBr4/UYx3wsfY8dxA5+B9PSctE8BWHOn79jx s6wMMmqRedZBUWknf6xfyWTKjrnLikSE39NXuA7eDsip/LMv1cnhJwQx816Cn7L52yE1 09/Jd/BVyGAei+QzD+4kYQ42X/gxAg67dWfwlNEG2grMp1I5GavrvUfcZNbpVgHQffi3 HOm5nQDOjZ6OPBjtZ2PqIRa0brAmAlq4LqAuTEnmksMk2w3SWQbN2oZId8+OU592DJs2 +rIg== MIME-Version: 1.0 X-Received: by 10.180.182.36 with SMTP id eb4mr1892165wic.8.1365836205197; Fri, 12 Apr 2013 23:56:45 -0700 (PDT) Received: by 10.180.78.8 with HTTP; Fri, 12 Apr 2013 23:56:45 -0700 (PDT) In-Reply-To: References: Date: Sat, 13 Apr 2013 10:56:45 +0400 Message-ID: From: Kakadu To: Anthony Tavener Cc: "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=047d7b622926d50feb04da38855c Subject: Re: [Caml-list] Types look compatible, but they aren't? --047d7b622926d50feb04da38855c Content-Type: text/plain; charset=ISO-8859-1 Maybe function type (int * int -> int * int) is incompatible with object type <..>? Kakadu On Sat, Apr 13, 2013 at 10:50 AM, Anthony Tavener wrote: > File "virtue.ml", line 462, characters 12-24: > Error: This expression has type > int * ((int * int -> int * int) list -> exn) * > (exn -> (int * int -> int * int) list) > but an expression was expected of type > int * ((< .. > as 'a) list -> exn) * (exn -> 'a list) > > The code in question: > > (fun id -> > let m = Modifier.attach id in > [ m Cast.total'k (fun (v,b) -> (v, max 1 (b-3))) (* <-- line > 462 *) > ; m Lab.total'k (fun (v,b) -> (v, max 1 (b-3))) ]) > > For reference, the signature of Modifier.attach: > Db.key -> int * ('a list -> exn) * (exn -> 'a list) -> 'a -> > Modifier.deleter > > OCaml version is 4.00.0 -- I know I should upgrade. Keep meaning to, I > guess I will if I wake up and there's no helpful soul explaining what could > be wrong here. :) > > Thank-you for any help. My eyes are starting to bug-out looking at this. > > -Tony > > > --047d7b622926d50feb04da38855c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Maybe function type (int * int -> int * int) is in= compatible with object type <..>?

Kakadu


On Sat, Apr 13, 201= 3 at 10:50 AM, Anthony Tavener <anthony.tavener@gmail.com><= /span> wrote:
File "virtue.ml", line 462, characte= rs 12-24:
Error: This expression has type
=A0 =A0 =A0 =A0 =A0int * ((i= nt * int -> int * int) list -> exn) *
=A0 =A0 =A0 =A0 =A0(exn -> (int * int -> int * int) list)
<= div>=A0 =A0 =A0 =A0but an expression was expected of type
=A0 =A0= =A0 =A0 =A0int * ((< .. > as 'a) list -> exn) * (exn -> &#= 39;a list)

The code in question:

=A0 (fun id ->=
=A0 =A0 let m =3D Modifier.attach id in
=A0 =A0 =A0 [ = m Cast.total'k (fun (v,b) -> (v, max = 1 (b-3))) =A0 =A0 (* <-- line 462 *)
=A0 =A0 =A0 ; m Lab.total'k (fun (v,b) -> (v, max 1 (b-3))) ])<= /div>

For reference, the signature of Modifier.attach:
=A0 Db.key -> int * ('a list -> exn) * (exn -> 'a= list) -> 'a -> Modifier.deleter

OCaml version is 4.00.0 -- I know I should upgrade. Kee= p meaning to, I
guess I will if I wake up and there's no help= ful soul explaining what could
be wrong here. :)

Thank-you for any help. My eyes are starting to bug-out looking = at this.

=A0-Tony



--047d7b622926d50feb04da38855c--