Thread: "ocaml_beginners"::[] Home-made initially opened module ?
"ocaml_beginners"::[]
Home-made initially opened module ?
2007-01-21 10:55:42
Hello all,
In my home-made Ocaml toplevel (created with ocamlmktop) I always start by typing the
command
open My_Pervasives;;
This module contains shortcuts values&functions that I use
very frequently (such as let hd=List.hd, etc).
Is there a hack to create a toplevel that automatically opens
this module when launched, so that I don't have to re-type the command above every time ? (AFAIK that's impossible, but
there's no harm in asking ...)
Re: "ocaml_beginners"::[]
Home-made initially opened module ?
2007-01-21 12:05:05
On Sun, Jan 21, 2007 at 04:55:42PM -0000, roparzhhemon wrote:
>
> Hello all,
>
> In my home-made Ocaml toplevel (created with ocamlmktop) I always start by typing the
> command
>
> open My_Pervasives;;
For Unix/Linux:
put that open-statement into a file called ".ocamlinit"
in your home-directory.
.ocamlinit will be used as if you have typed in the commands in this
file by hand.
Re: "ocaml_beginners"::[]
Home-made initially opened module ?
2007-01-21 17:28:29
On Sun, 21 Jan 2007, roparzhhemon wrote:
>
> Hello all,
>
> In my home-made Ocaml toplevel (created with ocamlmktop) I always start by typing the
> command >
> open My_Pervasives;;
>
> This module contains shortcuts values&functions that I use
> very frequently (such as let hd=List.hd, etc).
>
> Is there a hack to create a toplevel that automatically opens
> this module when launched, so that I don't have to re-type > the command above every time ? (AFAIK that's impossible, but
> there's no harm in asking ...)