startGroup :: (Serializable a, Serializable b)
           => [Resources]
           -> GroupType
           -> Closure (Actor a b)
           -> DNA (Shell (Scatter a) (Grp b))
startGroup res groupTy child = do
    (shellS,shellR) <- liftP newChan
    let clos = $(mkStaticClosure 'runActor) `closureApply` child
    sendACP $ ReqSpawnGroup clos shellS res groupTy
    (gid,mbox) <- liftP (receiveChan shellR)
    msgs <- mapM unwrapMessage mbox
    case sequence msgs of
      Nothing -> error "Bad shell message"
      Just  s -> return $ assembleShellGroup gid s
startGroup :: (Serializable a, Serializable b)
           => [Resources]
           -> GroupType
           -> Closure (Actor a b)
           -> DNA (Shell (Scatter a) (Grp b))
startGroup res groupTy child = do
    (shellS,shellR) <- liftP newChan
    let clos = $(mkStaticClosure 'runActor) `closureApply` child
    sendACP $ ReqSpawnGroup clos shellS res groupTy
    (gid,mbox) <- liftP (receiveChan shellR)
    msgs <- mapM unwrapMessage mbox
    case sequence msgs of
      Nothing -> error "Bad shell message"
      Just  s -> return $ assembleShellGroup gid s
startGroup res groupTy child = do
    (shellS,shellR) <- liftP newChan
    let clos = $(mkStaticClosure 'runActor) `closureApply` child
    sendACP $ ReqSpawnGroup clos shellS res groupTy
    (gid,mbox) <- liftP (receiveChan shellR)
    msgs <- mapM unwrapMessage mbox
    case sequence msgs of
      Nothing -> error "Bad shell message"
      Just  s -> return $ assembleShellGroup gid s