Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: caml-list@inria.fr
Subject: [Caml-list] Re: Type unification problem
Date: Wed, 30 Jun 2004 13:21:16 +0100	[thread overview]
Message-ID: <20040630122116.GA8170@redhat.com> (raw)
In-Reply-To: <20040630121625.GA8099@redhat.com>

On Wed, Jun 30, 2004 at 01:16:25PM +0100, rich wrote:
> Why this error (below)?  I can "fix" it by adding quite a lot of
> explicit types (I need one on every function which uses the
> Dbi.connection parameter).  Is there a simpler way to fix it?

[Sorry, there was an actual error in the last posting.  This is the
real error:]

File "contact.ml", line 81, characters 25-28:
This expression has type
  Apache.Request.t ->
  Cgi.cgi ->
  (< prepare_cached : string ->
                      (< execute : Dbi.sql_t list -> unit;
                         map : ([> `String of 'c ] list -> 'c) -> string list;
                         .. >
                       as 'b);
     .. >
   as 'a) ->
  int -> string -> 'd -> unit
but is here used with type
  Apache.Request.t ->
  Cgi.cgi -> Dbi.connection -> int -> string -> Ewp.login_t -> unit
Type 'a is not compatible with type
  Dbi.connection =
    < close : unit -> unit; closed : bool; commit : unit -> unit;
      database : string; database_type : string; debug : bool;
      ex : string -> Dbi.sql_t list -> Dbi.statement; host : string option;
      id : int; password : string option; ping : unit -> bool;
      port : string option; prepare : string -> Dbi.statement;
      prepare_cached : string -> Dbi.statement;
      register_postrollback : (unit -> unit) -> Dbi.postrollback_handle;
      register_precommit : (unit -> unit) -> Dbi.precommit_handle;
      rollback : unit -> unit; set_debug : bool -> unit;
      unregister_postrollback : Dbi.postrollback_handle -> unit;
      unregister_precommit : Dbi.precommit_handle -> unit;
      user : string option > 
Type 'b is not compatible with type
  Dbi.statement =
    < connection : Dbi.connection; execute : Dbi.sql_t list -> unit;
      fetch1 : unit -> Dbi.sql_t list;
      fetch1hash : unit -> (string * Dbi.sql_t) list;
      fetch1int : unit -> int; fetch1string : unit -> string;
      fetchall : unit -> Dbi.sql_t list list; finish : unit -> unit;
      fold_left : 'e. ('e -> Dbi.sql_t list -> 'e) -> 'e -> 'e;
      fold_right : 'f. (Dbi.sql_t list -> 'f -> 'f) -> 'f -> 'f;
      iter : (Dbi.sql_t list -> unit) -> unit;
      map : 'g. (Dbi.sql_t list -> 'g) -> 'g list; names : string list;
      serial : string -> int > 
make: *** [contact.cmo] Error 2


-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
Learning Objective CAML for C, C++, Perl and Java programmers:
http://www.merjis.com/richj/computers/ocaml/tutorial/

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2004-06-30 12:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-30 12:16 [Caml-list] " Richard Jones
2004-06-30 12:21 ` Richard Jones [this message]
2004-07-01  2:38   ` [Caml-list] " Jacques GARRIGUE

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=20040630122116.GA8170@redhat.com \
    --to=rich@annexia.org \
    --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