EdState.dcl 778 Bytes
Newer Older
Diederik van Arkel's avatar
Diederik van Arkel committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * EdState.dcl: the global state of the editor process
 */

definition module EdState

from StdId			import Id
from StdPSt			import PSt, IOSt
from StdMaybe		import Maybe
from EdKeyMapping	import KeyMapping
from EdMonad		import EditState
from EdMessage		import EditId

class Editor env
where
	getEditorState :: !*env -> *(!EditorState,!*env)
	setEditorState :: !EditorState !*env -> *env

Diederik van Arkel's avatar
Diederik van Arkel committed
19
instance Editor (PSt *l) | Editor l
Diederik van Arkel's avatar
Diederik van Arkel committed
20
21
22
23
24

:: EditorState

initEditorState		:: !KeyMapping					->	EditorState

25
findReceiver		:: !Id			!EditorState	->	(!Maybe EditId, !EditorState)
Diederik van Arkel's avatar
Diederik van Arkel committed
26
27
28
29
30
31
addReceiver			:: Id EditId	!EditorState	->	EditorState
removeReceiver		:: Id			!EditorState	->	EditorState

getKeyMapping		::				!EditorState	->	KeyMapping
setKeyMapping		:: KeyMapping	!EditorState	->	EditorState