Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- withEnvironment :: [(String, String)] -> IO a -> IO a
Documentation
withEnvironment :: [(String, String)] -> IO a -> IO a Source
Run the given action with the specified environment.
Before executing the action, withEnvironment
backs up the current environment,
clears out the environment, and then applies the supplied environment.
After the action has completed the original environment is restored.
Note: The environment is global for a process, so tests that depend on the
environment can no longer be run in parallel.