runActor :: Actor a b -> Process ()
runActor (Actor action) = do
    -- Obtain parameters
    (acp,ParamActor parent rnk grp) <- expect
    -- Create channels for communication
    (chSendParam,chRecvParam) <- newChan
    (chSendDst,  chRecvDst  ) <- newChan
    -- Send shell process back
    let shell = Shell (SingleActor acp)
                      (RecvVal chSendParam)
                      (SendVal chSendDst  )
    send parent (acp, wrapMessage shell)
    -- Now we can start execution and send back data
    a   <- receiveChan chRecvParam
    !b  <- runDNA acp rnk grp (action a)
    sendToDestChan chRecvDst b

-- | Run actor for group of processes which allow more than 1 task per
--   actor.
runActor :: Actor a b -> Process ()
runActor (Actor action) = do
    -- Obtain parameters
    (acp,ParamActor parent rnk grp) <- expect
    -- Create channels for communication
    (chSendParam,chRecvParam) <- newChan
    (chSendDst,  chRecvDst  ) <- newChan
    -- Send shell process back
    let shell = Shell (SingleActor acp)
                      (RecvVal chSendParam)
                      (SendVal chSendDst  )
    send parent (acp, wrapMessage shell)
    -- Now we can start execution and send back data
    a   <- receiveChan chRecvParam
    !b  <- runDNA acp rnk grp (action a)
    sendToDestChan chRecvDst b

-- | Run actor for group of processes which allow more than 1 task per
--   actor.
runActor (Actor action) = do
    -- Obtain parameters
    (acp,ParamActor parent rnk grp) <- expect
    -- Create channels for communication
    (chSendParam,chRecvParam) <- newChan
    (chSendDst,  chRecvDst  ) <- newChan
    -- Send shell process back
    let shell = Shell (SingleActor acp)
                      (RecvVal chSendParam)
                      (SendVal chSendDst  )
    send parent (acp, wrapMessage shell)
    -- Now we can start execution and send back data
    a   <- receiveChan chRecvParam
    !b  <- runDNA acp rnk grp (action a)
    sendToDestChan chRecvDst b

-- | Run actor for group of processes which allow more than 1 task per
--   actor.