Concurrent Clean : ObjectIO

startIOやopenDialogなどの第2引数で内部状態の初期値を与えるみたいです。
で、いろいろなところに出現する"PSt .l -> PSt .l"型の関数の"PSt .l"型の引数からその内部状態を取り出すことができます。たとえば、次のように。

Start :: *World -> *World
Start world
    = startIO NDI
              "sample text"
              (\ps=:{ls,io} = snd (openDialog Void (hello ls) ps))
              [ProcessClose closeProcess]
              world
  where
    hello txt = Dialog ""
                       (TextControl txt [])
                       [WindowClose (noLS closeProcess)
                       ,WindowPos (Center,NoOffset)]