From: Tom Hawkins <tom@confluent.org>
To: caml-list@yquem.inria.fr
Subject: Tools module for the Standard Lib
Date: Sun, 05 Dec 2004 11:36:05 -0600 [thread overview]
Message-ID: <41B34705.4000207@confluent.org> (raw)
Recently I've been reorganizing my build process for Confluence -- it's
a hardware design language implemented in OCaml.
A few days ago a Confluence user made an interesting suggestion: why not
use OCaml to build OCaml applications? He then proceeded to write an
OCaml script to generate the lexers and parsers, compile the interfaces
and implementations, then link everything together.
Extrapolating on this idea, it would be advantageous to have a "Tools"
module in the standard library to provide an interface to ocamlc,
ocamlopt, ocamllex, ocamlyacc, ocamldep, and all the other tools. Such
a module would provide first-class ADTs for data that is currently
represented in files: .ml, .mli, .mll, .cmi, .cmx, etc. For example:
let my_ml = Tools.ml_of_file "my.ml" in (* or ... *)
let gen_ml = Tools.ml_of_string "print_string \"hello!\"" in
With such a framework, the complexity of the build process is
encapsulated in a program. After your process is complete, write out
the final executable:
Tools.output_exe some_channel my_compiled_application
Just an idea.
-Tom
next reply other threads:[~2004-12-05 16:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-05 17:36 Tom Hawkins [this message]
2004-12-05 20:23 ` [Caml-list] " Kenneth Knowles
2004-12-06 10:36 ` Christian Lindig
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=41B34705.4000207@confluent.org \
--to=tom@confluent.org \
--cc=caml-list@yquem.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;
as well as URLs for NNTP newsgroup(s).