Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] Type unification problem
@ 2004-06-30 12:16 Richard Jones
  2004-06-30 12:21 ` [Caml-list] " Richard Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Jones @ 2004-06-30 12:16 UTC (permalink / raw)
  To: caml-list

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?

Rich.

File "contact.ml", line 81, characters 25-28:
This expression has type
  Apache.Request.t ->
  Cgi.cgi ->
  (< prepare_cached : string ->
                      (< execute : ([> `Int of string ] as 'c) list -> 'd;
                         map : ([> `String of 'e ] list -> 'e) -> string list;
                         .. >
                       as 'b);
     .. >
   as 'a) ->
  string -> string -> 'f -> 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 : 'g. ('g -> Dbi.sql_t list -> 'g) -> 'g -> 'g;
      fold_right : 'h. (Dbi.sql_t list -> 'h -> 'h) -> 'h -> 'h;
      iter : (Dbi.sql_t list -> unit) -> unit;
      map : 'i. (Dbi.sql_t list -> 'i) -> 'i list; names : string list;
      serial : string -> int > 
Type 'c is not compatible with type
  Dbi.sql_t =
    [ `Binary of string
    | `Bool of bool
    | `Date of Dbi.date
    | `Decimal of Dbi.Decimal.t
    | `Float of float
    | `Int of int
    | `Interval of Dbi.datetime
    | `Null
    | `String of string
    | `Time of Dbi.time
    | `Timestamp of Dbi.datetime
    | `Unknown of string ] 

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
If I have not seen as far as others, it is because I have been
standing in the footprints of giants.  -- from Usenet

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


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

end of thread, other threads:[~2004-07-01  2:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-30 12:16 [Caml-list] Type unification problem Richard Jones
2004-06-30 12:21 ` [Caml-list] " Richard Jones
2004-07-01  2:38   ` Jacques GARRIGUE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox