From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id A5298BBAF for ; Fri, 4 Jun 2010 17:21:09 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah0DAPa2CEzAI/YUi2dsb2JhbACSKIwxAQELCwoYIr9JhRcE X-IronPort-AV: E=Sophos;i="4.53,362,1272837600"; d="scan'208";a="51783733" Received: from ns2.inescn.pt (HELO trubo.inescn.pt) ([192.35.246.20]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 04 Jun 2010 17:21:09 +0200 Received: from localhost (localhost [127.0.0.1]) by trubo.inescn.pt (8.13.8/8.14.3/4) with ESMTP id o54FL8Ev008465 for ; Fri, 4 Jun 2010 16:21:08 +0100 X-Virus-Scanned: amavisd-new 2.6.3 (20090422) at inescporto.pt Received: from trubo.inescn.pt ([127.0.0.1]) by localhost (trubo.inescn.pt [127.0.0.1]) (amavisd-new, port 10024) with LMTP id BHdsfeQqz4z9 for ; Fri, 4 Jun 2010 16:21:06 +0100 (WEST) Received: from grover.inescn.pt (grover.inescn.pt [194.117.24.20]) by trubo.inescn.pt (8.13.8/8.14.3/2) with ESMTP id o54FL3oM008443 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 4 Jun 2010 16:21:03 +0100 Received: from [194.117.30.117] (merlinix.inescn.pt [194.117.30.117]) by grover.inescn.pt (8.13.8/8.13.8/6) with ESMTP id o54FL2G1023880 for ; Fri, 4 Jun 2010 16:21:03 +0100 Message-ID: <4C0919DF.6000002@inescporto.pt> Date: Fri, 04 Jun 2010 16:21:03 +0100 From: Hugo Ferreira User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: ocamlbuild - ocamlfind_query definition won't compile Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocamlfind:01 ocamlfind:01 printf:01 sprintf:01 ocaml:01 unix:01 compile:01 expression:02 expression:02 string:02 library:03 let:03 let:03 examples:07 definition:07 Hello, I have been looking at several examples that use ocamlfind to add a library to the ocamlbuild process. An example is: let ocamlfind_query pkg = let cmd = Printf.sprintf "ocamlfind query %s" (Filename.quote pkg) in My_unix.run_and_open cmd (fun ic -> Log.dprintf 5 "Getting Ocaml directory from command %s" cmd; input_line ic) However I get the following error: Error: This expression has type string but an expression was expected of type 'a -> 'b -> 'c I am using version 3.11.2. Can anyone tell me what I'm making the error? TIA, Hugo F.