On Fri, Dec 23, 2011 at 08:29:09PM +0100, Jérémie Dimino wrote:
> Le vendredi 23 décembre 2011 à 20:10 +0100, Dominique Martinet a écrit :
> > Yes, I've seen that - what I mean isn't clearing the view, but really
> > reseting the variables and whatever is defined.
> > Maybe there actually is something in the standard toplevel, but I don't
> > think I've ever heard about it :)
> 
> You can do that:
> 
> # let env = !Toploop.toplevel_env;;
> val env : Env.t = <abstr>
> # let x = 1;;
> val x : int = 1
> # Toploop.toplevel_env := env;;
> - : unit = ()
> # x;;
> Characters 0-1:
> Error: Unbound value x
[...]

Oh, cool. :-)

Ciao,
   Oliver

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to