init :: IO (PConf, PState)
init = do
    cmdChan <- newTChanIO
    outChan <- newTChanIO
    readerId <- readerProcess cmdChan
    writerId <- writerProcess outChan
    let conf = PConf cmdChan outChan
        state = PState readerId writerId
    return (conf, state)
init :: IO (PConf, PState)
init = do
    cmdChan <- newTChanIO
    outChan <- newTChanIO
    readerId <- readerProcess cmdChan
    writerId <- writerProcess outChan
    let conf = PConf cmdChan outChan
        state = PState readerId writerId
    return (conf, state)
init = do
    cmdChan <- newTChanIO
    outChan <- newTChanIO
    readerId <- readerProcess cmdChan
    writerId <- writerProcess outChan
    let conf = PConf cmdChan outChan
        state = PState readerId writerId
    return (conf, state)