__FILE__ returns the name of the module, not the name and absolute path.
On 05/10/2016 16:34, Pierrick Couderc wrote:
the absolute path of the module at compile time.
If I understood correctly, it is more about the directory of the module at compile time.
__FILE__ returns the name of the module, not the name and absolute path.One (hackish) way to do it is with the value __FILE__ in Pervasives (see http://caml.inria.fr/pub/docs/manual-ocaml/libref/ for some compile time constant used for debugging).Pervasives.html#6_Debugging It simply returns the path of the .ml given to the compiler, not an absolute path (except if you called the compiler on an absolute path, of course).
I do not understand what do you mean by "except if you called the compiler on an absolute path, of course"
could you please give me more details about calling the compiler on an absolute path ?
Thanks
Gustave