From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=AWL,DNS_FROM_RFC_POST, HTML_00_10,HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 7B6A7BBAF for ; Sun, 20 Jul 2008 19:35:51 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnEFAL8Tg0hC+Vq1ZWdsb2JhbACCOjiPDUMQBB4DlVaEPA X-IronPort-AV: E=Sophos;i="4.31,219,1215381600"; d="scan'208";a="27511566" Received: from ik-out-1112.google.com ([66.249.90.181]) by mail4-smtp-sop.national.inria.fr with ESMTP; 20 Jul 2008 19:35:51 +0200 Received: by ik-out-1112.google.com with SMTP id c30so837191ika.3 for ; Sun, 20 Jul 2008 10:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=dFzFdP9LB/Vm4HtxBVYVsK+fu1zAIg3EePrGdYmrqxo=; b=TxJxXvrfoPR8ilGzHXVS+nOORWtpoDaWCkRC7jdtvXRP6cU/0F3f+R8lYj8SRXV07u Yb/boEXMqTEa5BmEmRRzfxSOVbDOYz2M38nox3NCZ8w0YpAz9zWVQB6aefEgPe+3St0N eZtljXVoQ7OfXiPyKI1jr+sYGafoLRV2nt9tE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=J9BlzrUW1qz2XKpNqKPPAv00IuAHmuTeYDOEW71WvOLMXkwIU+CuvIHjN/kUTHAJAl QVgV4uQk1P4VNrYXI7paqvoHk4HZQmwFz9Us5pC6u1gKgGMtuAT3wqhhe0CWhl9c4toq ypBkvcKM6URA5iI7FoExFq/Hp+1YouZEwwXUE= Received: by 10.210.37.11 with SMTP id k11mr2382302ebk.107.1216575350001; Sun, 20 Jul 2008 10:35:50 -0700 (PDT) Received: by 10.210.61.10 with HTTP; Sun, 20 Jul 2008 10:35:49 -0700 (PDT) Message-ID: <527cf6bc0807201035x7b16999eha0f4cc4d7f18995a@mail.gmail.com> Date: Sun, 20 Jul 2008 19:35:49 +0200 From: "blue storm" To: "Dave Benjamin" Subject: Re: [Caml-list] Name of currently executing function Cc: caml-list@yquem.inria.fr In-Reply-To: <488364FC.6010809@ramenlabs.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_45691_18556408.1216575349991" References: <487AE3A6.2080008@ramenlabs.com> <527cf6bc0807140653w6bb30b5nfa73e2e16462f181@mail.gmail.com> <488364FC.6010809@ramenlabs.com> X-Spam: no; 0.00; ad-hoc:01 expr:01 functor:01 camlp:01 doable:01 camlp:01 ad-hoc:01 expr:01 functor:01 doable:01 storm:98 caml-list:01 macros:01 macros:01 awkward:02 ------=_Part_45691_18556408.1216575349991 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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). ------=_Part_45691_18556408.1216575349991 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
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).
------=_Part_45691_18556408.1216575349991--