caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Matej Kosik <5764c029b688c1c0d24a2e97cd764f@gmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] a question about compilation ... [sexplib; gramlib]
Date: Thu, 19 Sep 2013 12:36:30 +0100	[thread overview]
Message-ID: <523AE1BE.8090808@gmail.com> (raw)

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

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.

[-- Attachment #2: sample.ml --]
[-- Type: text/plain, Size: 130 bytes --]

open Camlp4.PreCast

type foo = Bar | Baz
with sexp

let l = __LOCATION__ in

Printf.printf "file_name = %s\n" (Loc.file_name l);

             reply	other threads:[~2013-09-19 11:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19 11:36 Matej Kosik [this message]
2013-09-19 12:17 ` Kakadu
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=523AE1BE.8090808@gmail.com \
    --to=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;
as well as URLs for NNTP newsgroup(s).