From: "Harrison, John R" <johnh@ichips.intel.com>
To: "'caml-list@inria.fr'" <caml-list@inria.fr>
Cc: "Harrison, John R" <johnh@ichips.intel.com>, 'johnh@ichips.intel.com'
Subject: [Caml-list] Questions about #use
Date: Fri, 8 Feb 2002 13:00:15 -0800 [thread overview]
Message-ID: <FD2423AA68A7D511A5A20002A50729E12C0FF8@orsmsx115.jf.intel.com> (raw)
The documentation for the "#use" directive says "phrases are processed just
as if they were typed on standard input". However according to my
experience with OCaml, this isn't really accurate. Some level of syntax
checking is first done on the whole file before any phrases are processed.
For example, a syntax error on the last line will prevent any phrases from
being fully processed.
I'd like a function that does indeed display the behaviour implied by the
documentation, i.e. handles the toplevel phrases successively. Is this
easily done?
I would also like to be able to issue an analogous directive dynamically
(e.g. to read files from a program-specific search path). Since "#use"
isn't a CAML value, I can't use it. Digging around in the sources I came up
with the following, which seems to work:
Toplevel.use_file Format.std_formatter <filename>
However, I didn't find any means of doing dynamic loading of source
mentioned in the documentation. Is the above safe or is something else
recommended?
John.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
next reply other threads:[~2002-02-09 8:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-08 21:00 Harrison, John R [this message]
2002-02-09 10:21 ` Daniel de Rauglaudre
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=FD2423AA68A7D511A5A20002A50729E12C0FF8@orsmsx115.jf.intel.com \
--to=johnh@ichips.intel.com \
--cc='johnh@ichips.intel.com' \
--cc=caml-list@inria.fr \
/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