On 2004-11-22, Benjamin Franksen <benjamin.franksen@bessy.de> wrote:
On Monday 22 November 2004 09:38, Adrian Hey wrote:
You have yet to explain how you propose to deal with stdout etc..
I see absolutely no reason why stdxxx must or should be top-level mutable objects. They can and should be treated in the same way as environment and command line arguments, i.e.
getArgs :: IO [String] getEnv :: String -> IO String getStdin, getStdout, getStderr :: IO Handle
Note that (just like environment and command line arguments) these handles may refer to completely different things on different program runs.
Er, no. The handles can be considered as the same but _pointing_ to different things on different runs. Keeping them outside the IO monad, and only accessing them inside -- i.e. the current situation -- would be fine. They're not mutable in any sense. -- Aaron Denney -><-