"Hugh Perkins" <[EMAIL PROTECTED]> writes:
> SystemLogging.LogInfo("About to do something...");
> DoSomething();
> SystemLogging.LogInfo("Did Something");
> SystemLogging.LogInfo("x is " + x );
>
> How can we do something similar in Haskell?
Maybe, with System.IO,
main =
do log <- openFile "/tmp/log.txt" AppendMode
hSetBuffering log LineBuffering
hPutStrLn log "About to do something..."
x <- return $! product [1 .. 65536]
hPutStrLn log "did something."
hPutStrLn log ("x is " ++ show x)
hClose log
Others may now correct me. (-:
-- Mark
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe