From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q2EHE8PQ017235 for ; Wed, 14 Mar 2012 18:14:08 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai4CAK3RYE9CbwQZk2dsb2JhbABDti4iAQEBAQkJCwkUBCOCCQEBBTgCBjkBDwsOCi4UKSCIHagskwkGkBtjiFuMfgGTLg X-IronPort-AV: E=Sophos;i="4.73,584,1325458800"; d="scan'208";a="149389379" Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 14 Mar 2012 18:14:04 +0100 Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 103B12135B for ; Wed, 14 Mar 2012 13:14:03 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute5.internal (MEProxy); Wed, 14 Mar 2012 13:14:03 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=smtpout; bh=yYckIg0NYKxxwZRJWrYUr22i3UM=; b=NX6zSUUvf3lLW9yJKSQe2cbSZ6f8 uO0oPuxOLNd1xrmQm2ZGy0J3JyZvc9diDX+zzD0zCfI2MjOQ5UtnKZjiwRZDUcDr BoldHiTe0uDia25UfgexGNFXD14F4b4TYYJzT1dNxw6Ge7nIYh3dEMDBghYtBjD1 j+ANkF3E9y/Vezg= X-Sasl-enc: 2EfzTLhW8tGLB3MqDwTlNd4z1/AqlfNrXyywLfFe9M3k 1331745242 Received: from davidb.org (dweb.davidb.org [173.255.246.16]) by mail.messagingengine.com (Postfix) with ESMTPSA id 5BC984825A5; Wed, 14 Mar 2012 13:14:02 -0400 (EDT) Date: Wed, 14 Mar 2012 10:14:00 -0700 From: David Brown To: Gerd Stolpmann Cc: bob zhang , Caml List Message-ID: <20120314171359.GA28810@davidb.org> References: <747ffc6fd1465f32ace1cdbb7d1c5100.squirrel@gps.dynxs.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] Parsing cmi file On Wed, Mar 14, 2012 at 01:25:49AM +0100, Gerd Stolpmann wrote: > >> Thanks. >> I know the dirty tricks, is there some way not that dirty? >> Godi did pretty printing this way? > >Yes. But why do you consider it as dirty? There is nothing wrong with it, >isn't it? This uses a helper program with a well-defined interface. > >I think you can also "use" ocamlc -i for it, maybe easier to wrap. ocamlc -i will print out all of the types of the .ml file, not just the interface. It's useful, but not necessarily what is wanted. The top trick doesn't work if the code isn't byte-compiled and has the consequence of running the module. It would be handy to be able to actually just dump out the .cmi file, especially in cases, such as prebuilt packages that include the .cmi but left out the .ml files. David