Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Kakadu <kakadu.hafanana@gmail.com>
To: Matej Kosik <5764c029b688c1c0d24a2e97cd764f@gmail.com>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] a question about compilation ... [sexplib; gramlib]
Date: Thu, 19 Sep 2013 16:17:16 +0400	[thread overview]
Message-ID: <CAGmVoG0jbs9-apKAwXuXdSJzU8nOO2kOevgmhVQmtSXcsM92bw@mail.gmail.com> (raw)
In-Reply-To: <523AE1BE.8090808@gmail.com>

AFAIK these syntax extensions are composable.

For your sample code I can see preprocessed result after executing
camlp4of -I `ocamlfind query type_conv` -I `ocamlfind query sexplib`
pa_type_conv.cma pa_sexp_conv.cma sample.ml

I'm not sure how to built-in it into compilation. Maybe you need add
command above after -pp option.

Happy hacking,
Kakadu

On Thu, Sep 19, 2013 at 3:36 PM, Matej Kosik
<5764c029b688c1c0d24a2e97cd764f@gmail.com> wrote:
> Hi,
>
> If my program contains "__LOCATION__" macro, I can get it compiled with the following instructions:
>
>         ocamlfind ocamlc -package camlp4.gramlib -pp camlp4of main.ml -o main.cmo -c
>         ocamlfind ocamlc -package camlp4.gramlib -linkpkg main.cmo -o main
>
> If my program contains "with sexp" macro, I can get it compiled with the following instructions:
>
>         ocamlfind ocamlc -package sexplib,sexplib.syntax -syntax camlp4o main.ml -o main.cmo -c
>         ocamlfind ocamlc -package sexplib,sexplib.syntax -linkpkg main.cmo -o main
>
> Is it technically possible to to compile a program where I use both "__LOCATION__" as well as "with sexp" macros?
> (like the attached sample)
>
> Thank you very much, in advance, for the help.
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

  reply	other threads:[~2013-09-19 12:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19 11:36 Matej Kosik
2013-09-19 12:17 ` Kakadu [this message]
2013-09-19 15:16 ` Gerd Stolpmann
2013-09-20  8:54   ` Matej Kosik

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=CAGmVoG0jbs9-apKAwXuXdSJzU8nOO2kOevgmhVQmtSXcsM92bw@mail.gmail.com \
    --to=kakadu.hafanana@gmail.com \
    --cc=5764c029b688c1c0d24a2e97cd764f@gmail.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