Version française
Home     About     Download     Resources     Contact us    
Browse thread
Multiple value declaration in .mli file
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: mohamed iguernelala <mohamed.iguernelala@y...>
Subject: Multiple value declaration in .mli file
Hello everyone,

We've just noticed that Ocaml permits to declare a value several times in an .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


      _____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr