mueval-0.6.3: Safely evaluate Haskell expressionsSource codeContentsIndex
cleanModules :: [String] -> Bool
defaultModules :: [String]
unsafe :: String -> Bool
cleanModules :: [String] -> BoolSource
Return false if any of the listed modules cannot be found in the whitelist.
defaultModules :: [String]Source
Modules which we should load by default. These are of course whitelisted. Specifically, we want the Prelude because otherwise things are horribly crippled; we want SimpleReflect so we can do neat things (for said neat things, see; and we want ShowQ and ShowFun to neuter IO stuff even more. The rest should be safe to import without clashes, according to the Lambdabot sources.
unsafe :: String -> BoolSource
Return true if the String contains anywhere in it any keywords associated 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.
Produced by Haddock version 2.3.0