From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA10066; Tue, 21 Jan 2003 12:47:38 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA09041 for ; Tue, 21 Jan 2003 12:47:37 +0100 (MET) Received: from mel-rto4.wanadoo.fr (smtp-out-4.wanadoo.fr [193.252.19.23]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h0LBlar06725 for ; Tue, 21 Jan 2003 12:47:36 +0100 (MET) Received: from mel-rta8.wanadoo.fr (193.252.19.79) by mel-rto4.wanadoo.fr (6.7.015) id 3E0C33FD00EE81AF for caml-list@inria.fr; Tue, 21 Jan 2003 12:47:36 +0100 Received: from debian (80.8.90.208) by mel-rta8.wanadoo.fr (6.7.015) id 3E26DA70002C6E66 for caml-list@inria.fr; Tue, 21 Jan 2003 12:47:36 +0100 Received: from moi by debian with local (Exim 3.36 #1 (Debian)) id 18awtI-0000f9-00 for ; Tue, 21 Jan 2003 12:48:28 +0100 To: caml-list@inria.fr Subject: Re: [Caml-list] view types in ocaml? Mail-Copy-To: never From: Remi VANICAT Date: Tue, 21 Jan 2003 12:48:28 +0100 In-Reply-To: <871y376vqx.fsf@cs.uga.edu> (Ed L Cashin's message of "20 Jan 2003 22:13:10 -0500") Message-ID: <87d6mq3er7.dlv@wanadoo.fr> User-Agent: Gnus/5.090012 (Oort Gnus v0.12) Emacs/21.2 (i386-pc-linux-gnu) References: <871y376vqx.fsf@cs.uga.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Ed L Cashin writes: > Hi. I like ocamlbrowser well enough, but is there a way to view type > info right from the interactive ocaml prompt? > > Here's what I'm thinking of (which won't work, of course). > > Objective Caml version 3.06 > > # #load "unix.cma";; > # Unix.LargeFile.lseek;; > - : Unix.file_descr -> int64 -> Unix.seek_command -> int64 = > # Unix.LargeFile.stats;; > type stats = { > st_dev : int; [...] > st_ctime : float; > } well, there is alway the module redefinition trick : # module M = Unix.LargeFile;; module M : sig val lseek : Unix.file_descr -> int64 -> Unix.seek_command -> int64 [...] type stats = Unix.LargeFile.stats = { st_dev : int; [...] st_ctime : float; } val stat : string -> stats val lstat : string -> stats val fstat : Unix.file_descr -> stats end of course, for very big module, this is not a solution. -- Rémi Vanicat vanicat@labri.u-bordeaux.fr http://dept-info.labri.u-bordeaux.fr/~vanicat ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners