From: Gustave Nimant <gustave.nimant@free.fr>
To: "caml-list@inria.fr" <caml-list@inria.fr>
Cc: Pierrick Couderc <pierrickcouderc@gmail.com>
Subject: Re: [Caml-list] How to get the path of Filename.current_dir_name
Date: Mon, 10 Oct 2016 10:47:22 +0200 [thread overview]
Message-ID: <57FB559A.1070302@free.fr> (raw)
In-Reply-To: <CA+gYG2tjPQN+oOT5=EUo9xh5svaW60hb9Ex888K3emHFzN-y6g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 854 bytes --]
On 05/10/2016 16:34, Pierrick Couderc wrote:
>
> If I understood correctly, it is more about the directory of the
> module at compile time.
>
the absolute path of the module at compile time.
> One (hackish) way to do it is with the value __FILE__ in Pervasives
> (see
> http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#6_Debugging
> for some compile time constant used for 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).
>
__FILE__ returns the name of the module, not the name and absolute path.
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
[-- Attachment #2: Type: text/html, Size: 1793 bytes --]
next prev parent reply other threads:[~2016-10-10 8:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-27 15:04 [Caml-list] [ANN] BAP 1.0.0 Ivan Gotovchits
2016-10-04 13:30 ` Anil Madhavapeddy
2016-10-05 14:11 ` [Caml-list] How to get the path of Filename.current_dir_name Gustave Nimant
2016-10-05 14:22 ` Gabriel Scherer
2016-10-05 14:34 ` Pierrick Couderc
2016-10-10 8:47 ` Gustave Nimant [this message]
2016-10-10 9:01 ` Pierrick Couderc
2016-10-10 10:26 ` Gustave Nimant
2016-10-05 14:35 ` Daniel Bünzli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57FB559A.1070302@free.fr \
--to=gustave.nimant@free.fr \
--cc=caml-list@inria.fr \
--cc=pierrickcouderc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox