EdMessage.dcl 561 Bytes
Newer Older
Diederik van Arkel's avatar
Diederik van Arkel committed
1
2
definition module EdMessage

3
4
// message passing with the editor

5
6
7
8
from StdId			import class Ids
from StdPSt			import :: PSt
from StdReceiver	import :: Receiver2
from EdMonad		import :: EditState, :: EditMonad, :: StateM
Diederik van Arkel's avatar
Diederik van Arkel committed
9
10
11

:: EditId
:: Message
12
:: EditAction l a	:== EditMonad (PSt l) a
Diederik van Arkel's avatar
Diederik van Arkel committed
13
14

openEditId			:: *env								-> (EditId, *env) | Ids env
Diederik van Arkel's avatar
Diederik van Arkel committed
15
openEditReceiver	:: !EditId							-> Receiver2 Message Message EditState (PSt .l)
Diederik van Arkel's avatar
Diederik van Arkel committed
16

Diederik van Arkel's avatar
Diederik van Arkel committed
17
18
hasEditState		:: !EditId			  			!*(PSt .l) -> *(Bool,		*PSt .l)
appEditState		:: !EditId !.(EditAction .l .r) !*(PSt .l) -> *(.r,*PSt .l)