local and public state after startIO

Peter Achten peter88@cs.kun.nl
Thu, 01 Oct 1998 10:49:28 +0200


At 09:27 AM 10/1/98 +0200, "Marko Srepfler" <marko@mia.os.CARNet.hr> wrote:

>after startIO i get new world as a result but can I get new public and
>local state
>something like
>	(local2,public2,newworld)=startIO local public ...

In the object I/O library this is not possible. Let me explain why.

The startIO function is actually a shorthand function for startProcesses:

startIO :: !.l !.p !(ProcessInit      (PSt .l .p))
                   ![ProcessAttribute (PSt .l .p)]
           !*World -> *World
startIO local public init atts world
   = startProcesses 
        (ProcessGroup public 
            (MDIProcess local init [ProcessNoWindowMenu:atts]
            )
        ) world

It creates one ProcessGroup that consists of one MDIProcess which suppresses the WindowMenu. 

startProcesses has the following type signature:

class Processes pdef where
    startProcesses :: !pdef !*World -> *World
    ...

It is overloaded in the pdef argument, which can, in principle, be anything. In any case the incidental public and local state are not known by startProcesses. So it is not possible to return final values for them. 

Hope this helps,

Peter Achten