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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 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 89B8FBC69 for ; Tue, 26 Sep 2006 00:40:44 +0200 (CEST) Received: from mta1.cl.cam.ac.uk (mta1.cl.cam.ac.uk [128.232.0.15]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k8PMeiaE011146 for ; Tue, 26 Sep 2006 00:40:44 +0200 Received: from ivatt.cl.cam.ac.uk ([128.232.8.11] helo=cl.cam.ac.uk) by mta1.cl.cam.ac.uk with esmtp (Exim 3.092 #1) id 1GRz7z-0007Tp-00; Mon, 25 Sep 2006 23:40:43 +0100 X-Uri: To: caml-list@inria.fr Cc: John.Harrison@cl.cam.ac.uk Subject: Listing toplevel bindings Date: Mon, 25 Sep 2006 23:40:02 +0100 From: John Harrison Message-Id: X-Miltered: at concorde with ID 45185AEC.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; toplevel:01 bindings:01 ocaml:01 toplevel:01 bindings:01 compile:01 int:01 int:01 top-level:02 objects:02 string:02 i'd:05 stuff:08 john:08 john:08 When inside the OCaml toplevel, is there any way of getting a list of all (top-level) bindings of names to objects of some specified type 'a? For example, given the type ":int" it might return an association list: ["x",1; "y",2; ...] : (string * int)list I'd be happy to compile more stuff into the toplevel if it's needed to make this possible. John.