From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pBNJdDdq019301 for ; Fri, 23 Dec 2011 20:39:13 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlsJAInX9E5beUeT/2dsb2JhbABDhD9QlnSDGYtmgTaBBYFyAQEFDBcPASktCQIaAhgOAgIUDwmIQKYtSIc2P4h4gS+HRoIEM2MElQGSNg X-IronPort-AV: E=Sophos;i="4.71,400,1320620400"; d="scan'208";a="136649871" Received: from nautica.notk.org ([91.121.71.147]) by mail1-smtp-roc.national.inria.fr with ESMTP; 23 Dec 2011 20:39:07 +0100 Received: by nautica.notk.org (Postfix, from userid 1001) id E78B7C009; Fri, 23 Dec 2011 20:39:06 +0100 (CET) Date: Fri, 23 Dec 2011 20:39:06 +0100 From: Dominique Martinet To: caml-list@inria.fr Message-ID: <20111223193906.GA19179@nautica> References: <4EF4C1B4.30408@inria.fr> <20111223184023.GA13146@nautica> <20111223191028.GB13146@nautica> <1324668549.22984.93.camel@aurora> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1324668549.22984.93.camel@aurora> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [Caml-list] try ocaml website Hi, Jérémie Dimino wrote on Fri, Dec 23, 2011 : > # let env = !Toploop.toplevel_env;; > val env : Env.t = > # let x = 1;; > val x : int = 1 > # Toploop.toplevel_env := env;; > - : unit = () > # x;; > Characters 0-1: > Error: Unbound value x Thanks! I've even found Toploop.initialize_toplevel_env () that does exactly what I wanted thanks to you :) It might be a good idea to make it more obvious or name it in the handy commands of the website then - I really believe that people, especially beginners or when toying around, want to clean their environment often. I though about it because I just had something weird I could not explain because the first thing I did was define a global x, and 10 minutes later it came back inside a function where I shouldn't have had an x... Maybe reset it when changing lesson? (though that might be unwanted sometimes too, I don't know.) Cheers, -- Dominique Martinet | Asmadeus