module Main where import IO import Distributed import Concurrent data Msgs = Down Pid deriving (Read,Show) main = do Distributed.start f "" f = do child <- spawnLink g unlinkMeFrom child linkMeWith child linkMeWith child let f = receive (\v -> case v of Down x -> do proc $ print x f ) f halt g = do proc $ threadDelay (1000*1000*10) proc $ print "raus!" return ()