From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 71C4ABBBB for ; Fri, 10 Feb 2006 07:10:19 +0100 (CET) Received: from quincy.inria.fr (quincy.inria.fr [128.93.8.52]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k1A6AIgl022872; Fri, 10 Feb 2006 07:10:18 +0100 Received: from [127.0.0.1] (quincy.inria.fr [128.93.8.52]) by quincy.inria.fr (Postfix) with ESMTP id E8A4E11C430; Fri, 10 Feb 2006 07:10:17 +0100 (CET) Message-ID: <43EC2FA2.609@inria.fr> Date: Fri, 10 Feb 2006 07:16:02 +0100 From: Michel Mauny Organization: INRIA Rocquencourt User-Agent: Thunderbird 1.5 (X11/20051025) MIME-Version: 1.0 To: Jonathan Roewen Cc: OCaml Subject: Re: [Caml-list] Toplevel Wish References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 43EC2E4A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; mauny:01 mauny:01 caml-list:01 toplevel:01 toplevel:01 printf:01 sig:01 printf:01 sig:01 val:01 fprintf:01 val:01 eprintf:01 sprintf:01 michel:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Jonathan Roewen a écrit : > I think it would be awesome if the toplevel would be able to spit out > the interface to a module. > > Like: > > # Printf;; > and it prints out a Module = sig ... end of the module if found. > Or like this: (;-)) # module P = Printf;; module P : sig val fprintf : out_channel -> ('a, out_channel, unit) format -> 'a val printf : ('a, out_channel, unit) format -> 'a val eprintf : ('a, out_channel, unit) format -> 'a val sprintf : ('a, unit, string) format -> 'a ... Maybe *module _ = Printf ;;* would be slightly more elegant, but the above does work. Regards, -- Michel