(* Initialise the toplevel environment. -*- tuareg -*-
- * $Id: init,v 1.6 2007/06/29 19:39:13 rjones Exp $
+ * $Id: init,v 1.10 2008/02/13 17:17:31 rjones Exp $
* - Removes the Pervasives module and any dangerous functions.
* - Loads just the modules we want to give access to, and just
* the functions within those modules that we want to give.
let _ = Hashtbl.create
let _ = Int32.to_string
let _ = Int64.to_string
+let _ = Lazy.force
let _ = List.length
let _ = Nativeint.to_string
let _ = Num.add_num
+let _ = Random.int
let _ = Ratio.null_denominator
let _ = Stack.create
let _ = Str.regexp
module StringMap = Map.Make(String)
(* Create an object, so we get the CamlinternalOO module. *)
-(* XXX Are any of the methods unsafe? *)
let _ = object end
-(* Load our custom grammar, which disables "external". *)
+(* ... but prevent public access to CamlinternalOO. *)
+module CamlinternalOO : sig
+end = struct end
#load "camlp4o.cma";;
#load "./pa_noexternal.cmo";;