caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] a question about compilation ... [sexplib; gramlib]
@ 2013-09-19 11:36 Matej Kosik
  2013-09-19 12:17 ` Kakadu
  2013-09-19 15:16 ` Gerd Stolpmann
  0 siblings, 2 replies; 4+ messages in thread
From: Matej Kosik @ 2013-09-19 11:36 UTC (permalink / raw)
  To: caml-list

[-- 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);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-20  8:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-19 11:36 [Caml-list] a question about compilation ... [sexplib; gramlib] Matej Kosik
2013-09-19 12:17 ` Kakadu
2013-09-19 15:16 ` Gerd Stolpmann
2013-09-20  8:54   ` Matej Kosik

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).