| Also if stmt =
|
|     SomeModule.prettyPrinter "foobar"
|
| and SomeModule contains
|
|     prettyPrinter x = putStrLn $ "Pretty: " ++ x
|
| then the let binding will not catch it.

Indeed, that's exactly what I meant in my original msg. I have always thought 
it ugly that stdin and stdout are top-level definitions.  I want to be able to 
say

        withStdout :: Handle -> IO a -> IO a

so that (withStdout h a) runs 'a' but sends all std-out output to h.

Haskell should support this.  Starting a whole OS process to redirect stdout 
must surely be overkill!

(But maybe that is what you have to do today.)

S

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to