caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Hezekiah M. Carty" <hcarty@atmos.umd.edu>
To: caml-list@inria.fr
Subject: ocamlbuild .inferred.mli problem
Date: Sat, 15 Sep 2007 22:36:23 -0400	[thread overview]
Message-ID: <20070916023623.GA10905@laptop44.chn.comcast.net> (raw)

I have been unable to get ocamlbuild to preprocess a single .ml file
when creating an inferred interface file.  Here is some simple code
to illustrate the problem:

test.ml:
value f x = x + 2;

_tags:
<test.ml>: pp(camlp4r)

To build it:
$ ocamlbuild test.cma
  ^^^ This works without issue

$ ocamlbuild test.inferred.mli
 ^^^ This produces the following output/error:
---BEGIN PASTE---
+ /home/hcarty/Applications/godi/bin/ocamlc.opt -i test.ml >
test.inferred.mli
File "test.ml", line 1, characters 0-5:
Unbound value value
Command exited with code 2.
Compilation unsuccessful after building 2 targets (1 cached) in
00:00:00.
---END PASTE---

I have tried various changes with the _tags line, such as:
<test.{ml,mli,inferred.mli}>
and others, but have had no success.

I have also tried creating a myocamlbuild.ml to get around this, but
using something like this in myocamlbuild.ml:

flag ["use_openin"]
  (S [A "-I"; A "+camlp4"; A "-pp"; A "camlp4o pa_openin.cmo"]);;

along with a matching flag in _tags causes havoc, with each of the
items on the list being repeated twice and quoted, leading to shell
errors.

I'm using revised syntax here as a simple example.  I originally ran
in to this issue while trying to build a library which uses the
pa_openin camlp4 extension.

Any suggestions or pointers on how to proceed with this?

Thanks,
Hez


             reply	other threads:[~2007-09-16  2:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-16  2:36 Hezekiah M. Carty [this message]
2007-09-17 14:25 ` [Caml-list] " Nicolas Pouillard
2007-09-17 18:08   ` Hezekiah M. Carty
2007-09-18 14:49     ` Nicolas Pouillard

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=20070916023623.GA10905@laptop44.chn.comcast.net \
    --to=hcarty@atmos.umd.edu \
    --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;
as well as URLs for NNTP newsgroup(s).