Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: Anil Madhavapeddy <Anil@recoil.org>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] working %.pp.ml target with ocamfind/ocamlbuild
Date: Sat, 31 Dec 2011 10:22:26 +0100	[thread overview]
Message-ID: <CAPFanBF0prKwq21WXXimgAxh7RgDp0uNxVMM8d0v5BRp6XWXxA@mail.gmail.com> (raw)
In-Reply-To: <E5C4DAB8-F586-49E9-874C-C7922794E135@recoil.org>

[-- Attachment #1: Type: text/plain, Size: 2365 bytes --]

I was also under the impression that ocamlbuild Ocamlfind integration was
unable to use archive(syntax) or archive(preprocessor) dependencies for
ocamlfind packages providing syntax extensions. This is a serious
limitation as it makes some ocamlfind packages unusable. If you're
considering improving this, I thank you in advance.

> I took a look at adding support for this into ocamlbuild (when
-use-ocamlfind is specified), but I couldn't spot any way to get ocamlfind
to output the syntax options.

I'm not sure what you're looking for exactly. If you whish to know what
archives should be included at the preprocessing step, this is done using
the "-predicates" option with, say, "-predicates syntax,preprocessor",
which will gives you the archives included in this situation:

  % ocamlfind query -predicates syntax,preprocessor -format '%A' type-conv
  pa_type_conv.cma

> Does everyone else manually run the camlp4o command when using syntax
extensions like type-conv or pa_lwt?

This is useful for debugging purposes, and for some (minor) modes of use of
Camlp4. However, for most Camlp4 development, this has the severe downside
of losing the location information of the original file, if I understand
correctly. This means that you don't want to use it as a transparent step
towards compilation, but only in exceptional situations where the
developers will re-edit the output code.

On Sat, Dec 31, 2011 at 12:19 AM, Anil Madhavapeddy <Anil@recoil.org> wrote:

> There's a very useful %.pp.ml target in OCamlbuild that runs the source
> through camlp4 and outputs the result.  This doesn't work when ocamlfind is
> used, as it includes the -pp flags within the ocamlfind invocation.
>
> I took a look at adding support for this into ocamlbuild (when
> -use-ocamlfind is specified), but I couldn't spot any way to get ocamlfind
> to output the syntax options.
>
> I just wanted to check that this is all in fact true, since it requires
> patching ocamlbuild, findlib, and oasis to make it work. Does everyone else
> manually run the camlp4o command when using syntax extensions like
> type-conv or pa_lwt?
>
> -anil
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>

[-- Attachment #2: Type: text/html, Size: 3048 bytes --]

  reply	other threads:[~2011-12-31  9:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-30 23:19 Anil Madhavapeddy
2011-12-31  9:22 ` Gabriel Scherer [this message]
2012-09-09 16:29   ` Wojciech Meyer
2012-09-10 12:08     ` [Caml-list] " Hongbo Zhang
2012-09-10 12:18       ` bob zhang
2012-09-10 13:04         ` Wojciech Meyer
2012-09-11 12:27         ` AW: " Gerd Stolpmann
2012-09-11 12:50           ` Wojciech Meyer
2012-09-11 13:41             ` AW: " Gerd Stolpmann
     [not found]             ` <1347370879.3496.9@samsung>
2012-09-11 14:02               ` Wojciech Meyer
2012-09-11 20:24           ` [Caml-list] Re: AW: " Hongbo Zhang
2012-09-11 23:13             ` [Caml-list] " Gerd Stolpmann
2012-09-12  5:16               ` Hongbo Zhang
2012-09-10 12:55       ` Wojciech Meyer
2012-09-10 13:52         ` Alain Frisch
2012-09-10 14:36           ` Paolo Donadeo
2012-09-18  6:08             ` [Caml-list] Slides of ML workshop (was: working %.pp.ml target with ocamfind/ocamlbuild) Alain Frisch
2012-09-20 21:04     ` [Caml-list] working %.pp.ml target with ocamfind/ocamlbuild Anil Madhavapeddy

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=CAPFanBF0prKwq21WXXimgAxh7RgDp0uNxVMM8d0v5BRp6XWXxA@mail.gmail.com \
    --to=gabriel.scherer@gmail.com \
    --cc=Anil@recoil.org \
    --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