-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
113 lines (91 loc) · 2.46 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Emonad
======
Author: Andrew Braunstein <bandrew> and Rafe Kettler <rkettler>
Date: 2012-11-04 Sun
Table of Contents
=================
1 Description
2 Architecture
2.1 Rope
2.2 Buffer
2.3 BufferList
2.4 Editor
2.5 UI
3 Additional Libraries
3.1 Rope
3.2 Vty
3.3 mtl
3.4 directory
3.5 HUnit
3.6 QuickCheck
4 Installation instructions
1 Description
--------------
Emonad is a text editor that is similar to emacs, but written in
Haskell. The frontend will be text only. The editor logic will be
completely pure reducing bugs and complications. This will be an
interesting design approach to text editors since most text editors,
including emacs, are written with lots of mutable state. While emacs has
elisp at its core, emonad will have Haskell at its core. Config
files will be written in Haskell.
2 Architecture
---------------
2.1 Rope
=========
This is the data structure that holds the text of the buffer. We
extended the rope library with a few extra functions that make it
easier to use.
- log time insertion and deletion
- constant time length
2.2 Buffer
===========
This is the data structure that deals with the buffer
- Move the mark and point
- Manipulate text
- Save to a file
- Load from a file
- Paging
2.3 BufferList
===============
This is the module that deals with the collection of buffers.
- Add new buffers
- Kill buffer
- Switch between buffers
- Transform the current buffer
2.4 Editor
===========
This is the current state of the editor. It knows about the buffer
list, the context of key presses, the minibuffer, and the terminal
- Deals with user input
- Switches between buffer and minibuffer
- Reads user input (IO)
- Sets the text in the minibuffer
2.5 UI
=======
This is the code that draws the editor in the terminal
- Primarily uses the vty library
- Uses combinators to layout the page
3 Additional Libraries
-----------------------
3.1 Rope
=========
This is the efficient data structure that we use to store text
3.2 Vty
========
Terminal interaction library
3.3 mtl
========
Monads!!!
3.4 directory
==============
Library that deals with the filesystem
3.5 HUnit
==========
Unit testing
3.6 QuickCheck
===============
Property based testing
4 Installation instructions
----------------------------
cabal configure
cabal install