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
Toplevel wishlist
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-01-19 (21:01)
From: Jonathan Roewen <jonathan.roewen@g...>
Subject: Re: [Caml-list] Toplevel wishlist
> 1) First, provide not only a toplevel but also a library that others
> could use to make toplevel-like interfaces to ocaml bytecode engine.

You mean toplevellib.cma for bytecode? ;-)

> 2) Do not hardcode stdin/stdout communication into toplevel. Instead,
> have a toplevel that communicates with the outside in a more abstract
> way. Thus it should be relatively easy to create toplevels that are
> equipped with line editing, that communicate through a graphical user
> interface (in a natural way), that talk via Texmacs, etc.

Using toplevellib.cma, you can create your own loop that reads/writes
from anything (though, for some reason, it appears the error printing
interface is not in the library dirs--why is that?).

> 4) Provide reasonable configuration options that allow one to customize
> the toplevel in a sensible way (such as pre-installed pretty printers
> and pre-open modules). Reading stuff _only_ from .ocamlinit is not fancy
> enough.

I made my own change to compiler/toplevel to specify modules to open
automatically. Look in mantis for it (it's not a proper patch, but
should be easy enough to apply yourself).