Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Kakadu <kakadu.hafanana@gmail.com>
To: Anthony Tavener <anthony.tavener@gmail.com>
Cc: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Types look compatible, but they aren't?
Date: Sat, 13 Apr 2013 10:56:45 +0400	[thread overview]
Message-ID: <CAGmVoG2eiM_t-qq5GCsOBuE3iYZG62PvVVtm_WueVx1FUjH3EQ@mail.gmail.com> (raw)
In-Reply-To: <CAN=ouMQQM8ox8qfSKP_ZPdwTdXb4FL5FwRuJMW9P5MERvPV3Dw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]

Maybe function type (int * int -> int * int) is incompatible with object
type <..>?

Kakadu


On Sat, Apr 13, 2013 at 10:50 AM, Anthony Tavener <anthony.tavener@gmail.com
> 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
>
>
>

[-- Attachment #2: Type: text/html, Size: 1896 bytes --]

  reply	other threads:[~2013-04-13  6:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-13  6:50 Anthony Tavener
2013-04-13  6:56 ` Kakadu [this message]
2013-04-13  7:33   ` Gabriel Scherer
2013-04-13 16:07     ` Anthony Tavener
2013-04-13 16:15       ` Anthony Tavener
2013-04-13 17:14         ` Gabriel Scherer
2013-04-13 17:25           ` Anthony Tavener

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=CAGmVoG2eiM_t-qq5GCsOBuE3iYZG62PvVVtm_WueVx1FUjH3EQ@mail.gmail.com \
    --to=kakadu.hafanana@gmail.com \
    --cc=anthony.tavener@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