Hi, i have the following

f :: [a] -> IO a
f xs = do
            m <- newMVar
            c1 <- forkIO f1 xs m
            c2 <- forkIO f2 xs m
            c3 <- forkIO f3 xs m
            c<- takeMVar m
            killThread c1
            killThread c2
            killThread c3
            return c



co (x:xs)
        ¦c == 1          = 1: co xs
        ¦otherwise      = (-1): co xs
        where c = unsafePerformIO (f (x:xs))




is it safe to use unsafePerformIO that way ? Please tell me why if it is not.

Cheers

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to