mueval-0.9.3: Safely evaluate pure Haskell expressions

Safe Haskell | Safe-Inferred
Language | Haskell98

Mueval.Context

Synopsis

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

# Documentation

cleanModules :: [String] -> Bool Source #

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 ShowFun to neuter IO stuff even more. The rest should be safe to import without clashes, according to the Lambdabot sources.

defaultPackages :: [String] Source #

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