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=1.1 required=5.0 tests=AWL,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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 2A56CBC6B for ; Mon, 8 Oct 2007 12:57:59 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAFOqCUfAXQInh2dsb2JhbACOQwIBCAop X-IronPort-AV: E=Sophos;i="4.21,242,1188770400"; d="scan'208";a="2606001" Received: from concorde.inria.fr ([192.93.2.39]) by mail2-smtp-roc.national.inria.fr with ESMTP; 08 Oct 2007 12:57:58 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l98AvuIp025959 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 8 Oct 2007 12:57:58 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAP2pCUfRVYC6mGdsb2JhbACOQwIBAQcEBhEW X-IronPort-AV: E=Sophos;i="4.21,242,1188770400"; d="scan'208";a="17571661" Received: from fk-out-0910.google.com ([209.85.128.186]) by mail4-smtp-sop.national.inria.fr with ESMTP; 08 Oct 2007 12:57:58 +0200 Received: by fk-out-0910.google.com with SMTP id z22so1449907fkz for ; Mon, 08 Oct 2007 03:57:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; bh=5VAoSJFZte1enWEU6KcJGGqjwLJdnPvQxHvJM/+Irbc=; b=ZvEjBJQmfRS1sCb0QJLWYbPalM34i+7I+1AbYxXpq4ecjK5trMtwJ6683cuzPsiyDCG2YHD8/MEFAOc+V7YTyPomj+o8/Nf2uVSti6JfHUCrKq9UFksXUBPVbhU1ztEnh1EUqr9DWz7tMqa6ow9eDA9Td52JmVlISrAwd6bM3wU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=QJU4dbGkiWeSZLA/kQQH9KJ5tGiOwc+zD31UuSiws9TLgIlyjivPWaqSE3+5dwTxJtAIUdBKw3VwwqkrL9Gb9Q77I9vMZ5eAt1jiEVX/GF3NkYYNVRj9PCBirKbbOi254V2E8sXWXES4NLtNIX2NemgFoH+l2gLaaKsomplrT+8= Received: by 10.82.171.16 with SMTP id t16mr16361015bue.1191841077426; Mon, 08 Oct 2007 03:57:57 -0700 (PDT) Received: from ?192.168.1.33? ( [83.52.235.32]) by mx.google.com with ESMTPS id k5sm7184647nfd.2007.10.08.03.57.55 (version=SSLv3 cipher=OTHER); Mon, 08 Oct 2007 03:57:56 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: <939CC7FB-3889-49BE-90BC-77491658409C@gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: Caml List From: Joel Reymont Subject: Pretty-printing the OCaml AST from the toplevel Date: Mon, 8 Oct 2007 11:57:56 +0100 X-Mailer: Apple Mail (2.752.3) X-Miltered: at concorde with ID 470A0D34.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 toplevel:01 ocaml:01 toplevel:01 camlp:01 camlp:01 foo:01 ast:02 ast:02 debugging:03 examples:07 i'm:09 i'm:09 example:10 changes:12 Are there any examples of pretty-printing the OCaml AST from the toplevel? I'm looking to use this during interactive debugging. I see the following example in the camlp4 changes doc camlp4 -parser OCaml -printer OCamlr foo.ml but I'm still browsing through Camlp4.ml to figure out what that does exactly. Thanks, Joel -- http://wagerlabs.com