
2 Oct
2009
2 Oct
'09
12:16 p.m.
Hi All. I'm very new using Concurrency and STM in Haskell. I'm trying some basic example using STM like this one: module Main where import IO import Control.Concurrent import Control.Concurrent.STM main :: IO () main = do forkIO (hPutStr stdout "Hello") hPutStr stdout " world\n" Loading this module in GHCi and running main, the result is: wHoerllldo On MacOs X 10.5.8 and on WindowsXp Compiling this module with: ghc --make Main.hs -o Main and launcing ./Main the result is just: Terminal> world Am I doing something wrong? My expected result was Hello world (or world Hello) Thanks in advance for any answer. Luca.