mueval-0.8.2: Safely evaluate Haskell expressions

Safe HaskellSafe-Infered

Mueval.Context

Synopsis

Documentation

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 http://twan.home.fmf.nl/blog/haskell/simple-reflection-of-expressions.details); 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.

qualifiedModules :: [(String, Maybe String)]Source

Borrowed from Lambdabot, this is the whitelist of modules which should be safe to import functions from, but which we don't want to import by default. FIXME: make these qualified imports. The GHC API & Hint currently do not support qualified imports. WARNING: You can import these with --module, certainly, but the onus is on the user to make sure they fully disambiguate function names; ie:

 mueval  --module Data.Map -e "Prelude.map (+1) [1..100]"