From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 826E9BBAF for ; Sat, 27 Jun 2009 10:32:05 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAGd1RUpQRFuw/2dsb2JhbADPCoQNBYE3 X-IronPort-AV: E=Sophos;i="4.42,300,1243807200"; d="scan'208";a="28848074" Received: from furbychan.cocan.org ([80.68.91.176]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES256-SHA; 27 Jun 2009 10:32:05 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1MKTKO-0008JB-7u; Sat, 27 Jun 2009 09:32:04 +0100 Date: Sat, 27 Jun 2009 09:32:04 +0100 To: Roland Zumkeller Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ignoring toplevel phrases? Message-ID: <20090627083204.GA31864@annexia.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; toplevel:01 toplevel's:01 val:01 camlp:01 camlp:01 toplevel:01 26,:98 2009:98 wrote:01 caml-list:01 int:01 int:01 silently:02 redhat:03 recompiling:03 On Fri, Jun 26, 2009 at 11:22:16AM +0700, Roland Zumkeller wrote: > Hi, > > Is it possible to modify the toplevel's behavior such that it silently > ignores any re-definitions of already bound identifiers (without > recompiling)? I would like to achieve the following: > > # let x = 0;; > val x : int = 0 > # let x = 1;; > # x;; > - : int = 0 Have you considered a camlp4 extension? I use a camlp4 extension in Xavierbot to close some potential security holes in the toplevel, so you could look at that code: http://et.redhat.com/~rjones/xavierbot/ Rich. -- Richard Jones Red Hat