Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Name of currently executing function
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-07-20 (17:35)
From: blue storm <bluestorm.dylc@g...>
Subject: Re: [Caml-list] Name of currently executing function
Your combination of Profiler and Macros is really clever. I tried to do
something with macros before coming to the Profiler solution, but i didn't
work out.

This solution is elegant because it integrates well with the other
program-wide macros ( __LOCATION__ and __FILE__ ), and more powerful than
the ad-hoc __LOG__ handling.

The idea of directly modifying the decorate_this_expr declaration seemed a
little awkward at first, but it actually is as useful as the functor
solution (because all we can get anyway is the function name), while a lot
simpler. I think you could even suggest it for inclusion in the main Camlp4
distribution (it should be doable to rebuild the old Camlp4Profiler features
on top of that).