)(,     QPull together several methods of reducing priority and easy access to resources:  , the rlimit bindings, and setCurrentDirectory. Set all the available rlimits. = These values have been determined through trial-and-error JReturn true if the String contains anywhere in it any keywords associated N with dangerous functions. Unfortunately, this blacklist leaks like a sieve - and will return many false positives (eg. 'unsafed  id "unsafed"' will , evaluate to True, even though the phrase "unsafe"# appears only in a String). But it ; will at least catch naive and simplistic invocations of unsafePerformIO,  inlinePerformIO, and  unsafeCoerce. LReturn false if any of the listed modules cannot be found in the whitelist. JModules which we should load by default. These are of course whitelisted. K Specifically, we want the Prelude because otherwise things are horribly K crippled; we want SimpleReflect so we can do neat things (for said neat  things, see   Mhttp://twan.home.fmf.nl/blog/haskell/simple-reflection-of-expressions.details); @ and we want ShowQ and ShowFun to neuter IO stuff even more. JBorrowed from Lambdabot, this is the whitelist of modules which should be " safe to import functions from. 3Just give us the end result options; this handles I/O and parsing for $ us. Bonus points for handling UTF. ESee the results of --help for information on what each option means.   KFrom inside the Interpreter monad, print the String (presumably the result O of interpreting something), but only print the first 1024 characters to avoid * flooding. Lambdabot has a similar limit. &Oh no, something has gone wrong. Call   and then, as with , ) print out a maximum of 1024 characters. GThe actual calling of Hint functionality. The heart of this just calls   B, but we do so much more - we disable Haskell extensions, turn on J optimizations, hide all packages, make sure one cannot call unimported P functions, typecheck (and optionally print it), set resource limits for this ( thread, and do some error handling. Wrapper around '; supplies a fresh GHC API session and 5 error-handling. The arguments are simply passed on. KFork off a thread which will sleep and then kill off the specified thread. A basic blocking operation.  Using MVars, block on forkedMain' until it finishes. Set a 5 on this thread, and then continue on with whatever.    !"# $ %&' mueval-0.5Mueval.ResourcesMueval.ContextMueval.ParseArgsMueval.InterpreterMueval.Concurrent unix-2.3.0.1System.Posix.ProcessbaseGHC.Err hint-0.2.4.1 Language.Haskell.Interpreter.GHClimitResourcesunsafe cleanModulesdefaultModulesinterpreterOpts getOptionsOptions timeLimitmodules expressionuser printType extensionssayprintInterpreterError interpreterinterpreterSessionwatchDogblock forkedMain forkedMain'nicetotalMemoryLimitHard safeModuleserror Hint.Evaleval