[Haskell-cafe] do you have to use fix with forkio?

Daryoush Mehrtash dmehrtash at gmail.com
Thu Mar 5 18:36:07 EST 2009

In this chat server implementation

forkIO is used with fix as in:

    reader <- forkIO $
fix $ <http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:.>
\loop -> do
        (nr', line) <- readChan chan'
        when (nr /=
nr') $ <http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:.>
hPutStrLn hdl line

Do you have to use fix?  Or is there a way to write this with a "let"?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090305/7f47107b/attachment.htm

More information about the Haskell-Cafe mailing list