From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p88EQpsq003288 for ; Thu, 8 Sep 2011 16:26:51 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AusCAMHPaE6flYLKgWdsb2JhbABDp38UAQEWJiaBdERxTwygbp9Phm0EkzOFA4R6hxs X-IronPort-AV: E=Sophos;i="4.68,350,1312149600"; d="ml'?mli'?scan'208";a="108162119" Received: from smtp.dico.unimi.it ([159.149.130.202]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Sep 2011 16:26:48 +0200 Received: from ulik.disi.unige.it (ulik.disi.unige.it [130.251.61.165]) (authenticated bits=0) by smtp.dico.unimi.it (8.14.4/8.14.4) with ESMTP id p88EQkKQ025678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 8 Sep 2011 16:26:46 +0200 Date: Thu, 8 Sep 2011 16:26:40 +0200 (CEST) From: Walter Cazzola To: OCaML Mailing List Message-ID: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1845608691-1315492006=:2830" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (smtp.dico.unimi.it [159.149.130.202]); Thu, 08 Sep 2011 16:26:46 +0200 (CEST) X-DSI-MailScanner-Information: Please contact the staff for more information X-DSI-MailScanner-ID: p88EQkKQ025678 X-DSI-MailScanner: Found to be clean X-DSI-MailScanner-From: cazzola@dico.unimi.it Subject: [Caml-list] separate compilation This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1845608691-1315492006=:2830 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Dear Experts, I'm a sort of newbe so be patient with if I ask something too silly (I've googled around but I didn't find anything really usefull). At the moment I'm investigating on how the OCaML module system and the separate compilation works. Nothing original I took the priority queue example from the user manual and split it into three files (attached): one with the structure (A.ml) one with the signature (A.mli) and one with a silly main (main.ml). Following the instructions in the manual I have tried to compile each file without linking but the only that compiles with success is the file with the signature since it doesn't refer to any other file. When I compile the structure or the main I get this error: >ocamlc -c A.ml File "A.ml", line 17, characters 39-52: Error: Unbound module type CharPQueueAbs I have tried to put #use or #load in the A.ml and main.ml file but the only result is to get a syntax error (e.g., with #use "A.mli" at the beggining of A.ml) >ocamlc -c A.ml File "A.ml", line 1, characters 0-1: Error: Syntax error What am I doing wrong? Any help is appreciate, thanks. Walter -- --8323328-1845608691-1315492006=:2830 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=A.mli Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=A.mli bW9kdWxlIHR5cGUgQ2hhclBRdWV1ZUFicyA9DQogICBzaWcNCiAgICAgdHlw ZSBwcmlvcml0eSA9IGludCAgICAgICAgICgqIHN0aWxsIGNvbmNyZXRlICop DQogICAgIHR5cGUgY2hhcl9xdWV1ZSAgICAgICAgICAgICgqIG5vdyBhYnN0 cmFjdCAqKQ0KICAgICB2YWwgZW1wdHkgOiBjaGFyX3F1ZXVlDQogICAgIHZh bCBpbnNlcnQgOiBjaGFyX3F1ZXVlIC0+IGludCAtPiBjaGFyIC0+IGNoYXJf cXVldWUNCiAgICAgZXhjZXB0aW9uIFF1ZXVlSXNFbXB0eQ0KICAgZW5kOzsN Cg== --8323328-1845608691-1315492006=:2830 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=A.ml Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=A.ml I3VzZSAiQS5tbGkiDQoNCm1vZHVsZSBQcmlvUXVldWUgPQ0KICAgc3RydWN0 DQogICAgIHR5cGUgcHJpb3JpdHkgPSBpbnQNCiAgICAgdHlwZSBjaGFyX3F1 ZXVlID0gRW1wdHkgfCBOb2RlIG9mIHByaW9yaXR5ICogY2hhciAqIGNoYXJf cXVldWUgKiBjaGFyX3F1ZXVlDQogICAgIGV4Y2VwdGlvbiBRdWV1ZUlzRW1w dHkNCiAgICAgDQogICAgIGxldCBlbXB0eSA9IEVtcHR5DQogICAgIGxldCBy ZWMgaW5zZXJ0IHF1ZXVlIHByaW8gZWx0ID0NCiAgICAgICBtYXRjaCBxdWV1 ZSB3aXRoDQogICAgICAgICBFbXB0eSAtPiBOb2RlKHByaW8sIGVsdCwgRW1w dHksIEVtcHR5KQ0KICAgICAgIHwgTm9kZShwLCBlLCBsZWZ0LCByaWdodCkg LT4NCiAgICAgICAgICAgaWYgcHJpbyA8PSBwDQogICAgICAgICAgIHRoZW4g Tm9kZShwcmlvLCBlbHQsIGluc2VydCByaWdodCBwIGUsIGxlZnQpDQogICAg ICAgICAgIGVsc2UgTm9kZShwLCBlLCBpbnNlcnQgcmlnaHQgcHJpbyBlbHQs IGxlZnQpDQogICBlbmQ7Ow0KDQptb2R1bGUgQWJzdHJhY3RQcmlvUXVldWUg PSAoUHJpb1F1ZXVlOiBDaGFyUFF1ZXVlQWJzKTs7DQo= --8323328-1845608691-1315492006=:2830 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=main.ml Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=main.ml b3BlbiBBYnN0cmFjdFByaW9RdWV1ZTs7DQoNCmxldCB4ID0gaW5zZXJ0IGVt cHR5IDEgJ2EnIDs7DQo= --8323328-1845608691-1315492006=:2830--