* Two questions about Toploop
@ 2006-02-14 17:19 Marco Maggesi
0 siblings, 0 replies; only message in thread
From: Marco Maggesi @ 2006-02-14 17:19 UTC (permalink / raw)
To: caml-list
Hi, I have two questions about Toploop:
(1) Would be difficult to write a function that builds the list of
all of all values of a certain type? E.g. a function
get_toploop_int : unit -> (string * int) list
with the behavior
let a = 2;;
let b = 3;;
get_toploop_int ();;
==> ["a", 2; "b", 3]
(2) It seems that the function Toploop.getvalue works only with
variables defined in the top environment but not in
(sub)modules. E.g.
# Pervasives.exit;;
- : int -> 'a = <fun>
# Toploop.getvalue "Pervasives.exit";;
>> Fatal error: Pervasives.exit unbound at toplevel
Exception: Misc.Fatal_error.
Is it possible to inspect values in the environment relative to
other modules?
M.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-02-14 17:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-14 17:19 Two questions about Toploop Marco Maggesi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox