[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2002-01-28 (03:30) |
From: | Mathieu Gagne <mathieug@e...> |
Subject: | [Caml-list] Location in source code |
Hello, I would like to be able to define in OCaml analogues of the cpp macros __FILE__ and __LINE__, for debugging purposes. For instance, I would like to be able to write Printf.printf "I had an error in module %s at line %d" __MODULE__ __LINE__ or something similar. __MODULE__ would expand to the fully qualified module name. I expect something like this might be possible using camlp4, but I can't figure out how. Does anyone have any idea how to achieve this? Best, Mathieu Gagne. ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr