From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p88EXYvK003791 for ; Thu, 8 Sep 2011 16:33:35 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApYBAFrRaE7RVdgpkGdsb2JhbABDmHyHQwGHNwgUAQEBAQkJDQcUBCKBRgEBAQECARICLAEbDwMLAQMBCwYFBAcaISIBEQEFAQoSBhMSEIdTBJsuCos+glaFLzuIbQIDBoZnBIJUkF+JfYJyPIJDgSo X-IronPort-AV: E=Sophos;i="4.68,350,1312149600"; d="scan'208";a="118855110" Received: from mail-qw0-f41.google.com ([209.85.216.41]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 08 Sep 2011 16:33:32 +0200 Received: by mail-qw0-f41.google.com with SMTP id 26so633685qwa.0 for ; Thu, 08 Sep 2011 07:33:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=WpaoTHWjF3D2kR3QzvFOQHsPnN2D4ZpeLNFiE/oB7Gg=; b=s62E4uHBQb6hvGu6MS3TpXowJh8l0uiA2+fnaeDFU7C0PgMOQpuvoA5Ncz+UtaSM5T SbqueAZqnkTSy2Nm2JHl9rPcuqSTWgBfVb7rslwoQJw1+ZoO0SYs12zIB5gB91/F8p5W MU7YRY5gDPsOVgX1BG7vhRgO7niJdPbFMbMw4= Received: by 10.229.1.99 with SMTP id 35mr583332qce.84.1315492412179; Thu, 08 Sep 2011 07:33:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.19.213 with HTTP; Thu, 8 Sep 2011 07:33:12 -0700 (PDT) In-Reply-To: References: From: Esther Baruk Date: Thu, 8 Sep 2011 16:33:12 +0200 Message-ID: To: Walter Cazzola Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=0016367d5f7eeec6d504ac6ef178 Subject: Re: [Caml-list] separate compilation --0016367d5f7eeec6d504ac6ef178 Content-Type: text/plain; charset=ISO-8859-1 You must also put the signature of the module type CharPQueueAbs in the implementation (A.ml). Note that the directive #use or #load are toplevel directives. They cannot be used at compilation. Esther Baruk On Thu, Sep 8, 2011 at 4:26 PM, Walter Cazzola wrote: > 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 > > -- > -- > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/**wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/**ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-**bugs > > --0016367d5f7eeec6d504ac6ef178 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable You must also put the signature of the module type CharPQueueAbs in the imp= lementation (A.ml).
Note that the directive #use or #load are toplevel = directives. They cannot be used at compilation.



Esther Baruk


On Thu, Sep 8, 2011 at 4:26 PM, Walter C= azzola <cazzo= la@dico.unimi.it> wrote:
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<= br> 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:
=A0>ocamlc -c A.ml
=A0File "A.ml", line 17, characters 39-52:
=A0Error: 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)

=A0>ocamlc -c A.ml
=A0File "A.ml", line 1, characters 0-1:
=A0Error: Syntax error

What am I doing wrong? Any help is appreciate, thanks.

Walter

--
--
Caml-list mailing list. =A0Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners<= /a>
Bug reports:
http://caml.inria.fr/bin/caml-bugs


--0016367d5f7eeec6d504ac6ef178--