Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2006-09-25 (22:40)
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.