* toplevel listing of modules?
@ 2000-10-20 7:07 Stephan Houben
2000-10-20 12:37 ` Pierre Weis
2000-10-20 12:39 ` Daniel de Rauglaudre
0 siblings, 2 replies; 3+ messages in thread
From: Stephan Houben @ 2000-10-20 7:07 UTC (permalink / raw)
To: caml-list
Hello list,
I have a question: is there a way to get a list of all
(types|values|modules|...) that are currently available in the toplevel?
Is there a way to get a list of all the stuff in a module?
One of the things I like in Python is that if you have a module `os', then
`dir(os)' will get you a list of all stuff that is in `os'.
This is great for interactive experiments with a new module.
Is there something similar in O'Caml?
Greetings,
Stephan
--
ir. Stephan H.M.J. Houben
tel. +31-40-2474358 / +31-40-2743497
e-mail: stephanh@win.tue.nl
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: toplevel listing of modules?
2000-10-20 7:07 toplevel listing of modules? Stephan Houben
@ 2000-10-20 12:37 ` Pierre Weis
2000-10-20 12:39 ` Daniel de Rauglaudre
1 sibling, 0 replies; 3+ messages in thread
From: Pierre Weis @ 2000-10-20 12:37 UTC (permalink / raw)
To: Stephan Houben; +Cc: caml-list
> Hello list,
>
> I have a question: is there a way to get a list of all
> (types|values|modules|...) that are currently available in the toplevel?
As far as I know, no.
> Is there a way to get a list of all the stuff in a module?
Yes. To know the contents of module M, just define a new module as an
alias of module M:
module X = M;;
[...]
Best regards,
Pierre Weis
INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: toplevel listing of modules?
2000-10-20 7:07 toplevel listing of modules? Stephan Houben
2000-10-20 12:37 ` Pierre Weis
@ 2000-10-20 12:39 ` Daniel de Rauglaudre
1 sibling, 0 replies; 3+ messages in thread
From: Daniel de Rauglaudre @ 2000-10-20 12:39 UTC (permalink / raw)
To: stephanh; +Cc: caml-list
Hello,
On Fri, Oct 20, 2000 at 09:07:11AM +0200, Stephan Houben wrote:
> I have a question: is there a way to get a list of all
> (types|values|modules|...) that are currently available in the toplevel?
> Is there a way to get a list of all the stuff in a module?
For the contents of a module, there is a trick. To have the contents
of, e.g. the module List, type:
# module M = List;;
--
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-10-20 12:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-20 7:07 toplevel listing of modules? Stephan Houben
2000-10-20 12:37 ` Pierre Weis
2000-10-20 12:39 ` Daniel de Rauglaudre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox