mueval-0.8.2: Safely evaluate Haskell expressions

Safe Haskell | Safe-Infered

Mueval.Context

Synopsis

- cleanModules :: [String] -> Bool
- defaultModules :: [String]
- qualifiedModules :: [(String, Maybe String)]

# Documentation

cleanModules :: [String] -> Bool

Return false if any of the listed modules cannot be found in the whitelist.

defaultModules :: [String]

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)]

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]"