-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
52 lines (42 loc) · 1.59 KB
/
TODO
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
-ask atze about gadts/exprs [ph]
-add option parsing to main [ph]
-maybe do some compiling stuff [ph]
-- Grammar
What is the difference between VIdent and CIdent in FunIdentifier ? (Removed now)
Add Var as (Identifier, Type)
-- Personal Branch (dev)
Dealing with typed expr (GADT, errors ... )
GADTs cannot be used easily:
In many data types Expr should be changed with Expr a, but we cannot add a to Statement
Dealing with heterogeneous lists is unsuitable.
Think about a good signature for compile
I would use a monadic computation to model the compilation process:
The compilation is a complex statefull transformation that might also fail
due to type error (or recursion)
Propose:
Compile transformer
Extendible (Log)
Combines: * State
* Error Handling
* Provides Concatanation (>>=)
Define a way to jump (maybe a jump instruction??? Jump s :: Instruction)
I would add an instruction Jump s and "compile" it properly using flip
Jump s -> Flip 1 s anyState
-- Project
-- Short term tasks
* Always write haddock documentation and tests for your code.
Use TODO and FIX
* Add haddock description
* Provide test cases for parsers (also failing examples)
* Provide test cases for compiler
* Complete cabal file
* Some parsers are missing (pTry),
Pretty Printer for AST (maybe definig a good instance of Show)
-- "Long" term tasks
Make presentation (short demos); how long?
Working (sensible) ant strategy (28/10)
Compile the AST to low level
Define Grammar
Write Parser for Grammar
Write Compiler for AST
Run the compiler