Version française
Home     About     Download     Resources     Contact us    
Browse thread
Listing toplevel bindings
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Harrison <John.Harrison@c...>
Subject: Listing toplevel bindings

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.