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 with pre-installed printers
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Eric Cooper <ecc@c...>
Subject: Re: [Caml-list] toplevel with pre-installed printers
On Thu, Jan 19, 2006 at 05:49:07PM +0000, Richard Jones wrote:
> On Thu, Jan 19, 2006 at 06:08:06PM +0100, Andrej Bauer wrote:
> > Eric Stokes wrote:
> > > When the toplevel starts up, it evaluates (on unix) ~/.ocamlinit,  
> > > which can contain arbitrary ocaml expressions.
> > 
> > Sorry, I was not clear enough. I know about .ocamlinit. I am going to
> > have several custom ocamltop's and they can't all share the same
> > .ocamlinit. What now?
> We tried to do the same thing and couldn't find a way.  One rather
> nasty suggestion involved a surrounding shell script which would
> launch the right toplevel in the right directory with the right
> .ocamlinit.  It's not pleasant.

In a single "master" .ocamlinit, you could dispatch on
Sys.executable_name, and perhaps Sys.getcwd.  Still a hack, but it
might avoid (non-OCaml) wrapper scripts.

Eric Cooper             e c c @ c m u . e d u