caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Question on camlp4 3.10
@ 2007-07-26 13:46 Benedikt Grundmann
  2007-07-26 13:50 ` [Caml-list] " Nicolas Pouillard
  0 siblings, 1 reply; 5+ messages in thread
From: Benedikt Grundmann @ 2007-07-26 13:46 UTC (permalink / raw)
  To: Caml-list

How can I get the name of the module where my syntax extension is
applied?  For simplicity assume that I would like to write a MODULE
macro similar to __FILE__ in c.

shell> cat > test.ml
let _ = print_endline MODULE

shell> ./test
Test
shell> cat > test2.ml
module M =
struct
  let _ = print_endline MODULE
end

shell> ./test2
Test.M


Cheers,

Bene



-- 
Calvin: I try to make everyone's day a little more
surreal.

(From Calvin & Hobbes)


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

end of thread, other threads:[~2007-08-09 18:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-26 13:46 Question on camlp4 3.10 Benedikt Grundmann
2007-07-26 13:50 ` [Caml-list] " Nicolas Pouillard
     [not found]   ` <9b415f950707260657v6f2f92c6s84e2334f8c34e137@mail.gmail.com>
2007-07-26 14:04     ` Nicolas Pouillard
2007-07-27 13:52       ` Benedikt Grundmann
2007-08-09 18:32         ` Nicolas Pouillard

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