From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.9 required=5.0 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST,HTML_MESSAGE autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 0890ABB84 for ; Thu, 14 Aug 2008 18:25:56 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqwCAL34o0jZkraAmmdsb2JhbACCMy6LbIMyAQEBAQEIBQgHEQOjXoFV X-IronPort-AV: E=Sophos;i="4.32,210,1217800800"; d="scan'208";a="13995782" Received: from web28108.mail.ukl.yahoo.com ([217.146.182.128]) by mail2-smtp-roc.national.inria.fr with SMTP; 14 Aug 2008 18:25:55 +0200 Received: (qmail 43330 invoked by uid 60001); 14 Aug 2008 16:25:55 -0000 Received: from [195.83.213.140] by web28108.mail.ukl.yahoo.com via HTTP; Thu, 14 Aug 2008 16:25:54 GMT X-Mailer: YahooMailWebService/0.7.218 Date: Thu, 14 Aug 2008 16:25:54 +0000 (GMT) From: mohamed iguernelala Subject: Multiple value declaration in .mli file To: caml-list@yquem.inria.fr MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1158347441-1218731154=:42946" Message-ID: <186665.42946.qm@web28108.mail.ukl.yahoo.com> X-Spam: no; 0.00; mli:01 ocaml:01 mli:01 val:01 val:01 bool:01 ocaml:01 bool:01 compiles:01 compiles:01 int:01 int:01 define:02 define:02 declaration:02 X-Attachments: cset="utf-8" cset="utf-8" --0-1158347441-1218731154=:42946 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello everyone, We've just noticed that Ocaml permits to declare a value several times in a= n .mli file. For example : We can write in a.mli ---- val f : int val f : bool ---- and it compiles. But if we define a value f in a.ml it compiles only when f's value is 'a. From external files, only the second declaration is visible. Then why Ocaml allows multiple declaration for the same value in .mli files. Are there any reason to allow it ? ------ David & Mohamed=0A=0A=0A _____________________________________________= ________________________________ =0AEnvoyez avec Yahoo! Mail. Une boite mai= l plus intelligente http://mail.yahoo.fr --0-1158347441-1218731154=:42946 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
=0A=0A=0A
=0AEnvoy=C3=A9 avec Yahoo! Mail.
Une boite mail plus intelligente.
--0-1158347441-1218731154=:42946--
Hello everyone,

We've jus= t noticed that Ocaml permits to declare a value several times in an .mli fi= le.

For example : We can write in a.mli

----
val f : intval f : bool
----

and it compiles.

But if we define a va= lue f in a.ml it compiles only when f's value is 'a.
From external files, only the second declaration is visible. Then why Ocaml allows multiple declaration for the same value in .mli files. Are there any reason to allow it ?

------
David & Mohamed