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 _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs