Version française
Home     About     Download     Resources     Contact us    
Browse thread
Saving the OCaml interpreter state
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] Saving the OCaml interpreter state

Le 13 avr. 07 à 21:38, Gerd Stolpmann a écrit :

> What we don't have is a convenient way to create
> sessions. Maybe we can add that by recording the interactively  
> submitted
> definitions, and replaying them later.

You are right, record expressions that were _correctly_ parsed. ledit  
falls short of this goal :

> > ledit -h session1 ocaml
>         Objective Caml version 3.09.3
>
> # let x = 3;;
> val x : int = 3
> #^D
> > ledit -h session2 ocaml
>         Objective Caml version 3.09.3
>
> # #use "session1";;
> val x : int = 3

The problem is when you type malformed expressions, they are also  
recorded (ledit cannot know they are malformed) and #using the  
session breaks, you need to clean it before.

Your proposal seems a good and reasonable feature wish.

Best,

Daniel