caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Types look compatible, but they aren't?
@ 2013-04-13  6:50 Anthony Tavener
  2013-04-13  6:56 ` Kakadu
  0 siblings, 1 reply; 7+ messages in thread
From: Anthony Tavener @ 2013-04-13  6:50 UTC (permalink / raw)
  To: caml-list

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

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: 1391 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-04-13 17:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-13  6:50 [Caml-list] Types look compatible, but they aren't? Anthony Tavener
2013-04-13  6:56 ` Kakadu
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

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).