-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1426 lines (1380 loc) · 63.7 KB
/
index.html
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2024-09-14 Sat 18:16 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>SydML</title>
<meta name="author" content="Madeleine Sydney Ślaga" />
<meta name="generator" content="Org Mode" />
<link rel="stylesheet" type="text/css" href="src/bigblow_theme/css/htmlize.css"/>
<link rel="stylesheet" type="text/css" href="src/bigblow_theme/css/bigblow.css"/>
<link rel="stylesheet" type="text/css" href="src/bigblow_theme/css/hideshow.css"/>
<script type="text/javascript" src="src/bigblow_theme/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="src/bigblow_theme/js/jquery-ui-1.10.2.min.js"></script>
<script type="text/javascript" src="src/bigblow_theme/js/jquery.localscroll-min.js"></script>
<script type="text/javascript" src="src/bigblow_theme/js/jquery.scrollTo-1.4.3.1-min.js"></script>
<script type="text/javascript" src="src/bigblow_theme/js/bigblow.js"></script>
<script type="text/javascript" src="src/bigblow_theme/js/hideshow.js"></script>
<script type="text/javascript" src="src/lib/js/jquery.stickytableheaders.min.js"></script>
</head>
<body>
<div id="content" class="content">
<h1 class="title">SydML</h1>
<div id="table-of-contents" role="doc-toc">
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">
<ul>
<li><a href="#orgf86c3f1">1. About</a></li>
<li><a href="#orgdf873bb">2. Motivation</a>
<ul>
<li><a href="#org83ac9cc">2.1. Demonstrate that I’ve learned from last year’s failures</a>
<ul>
<li><a href="#org2aa9716">2.1.1. Very poor planning.</a></li>
<li><a href="#org0d68e81">2.1.2. Not enough testing.</a></li>
</ul>
</li>
<li><a href="#orgb89f925">2.2. New goals</a>
<ul>
<li><a href="#org5d6852f">2.2.1. IRs — ANF and SSA</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org888ae9c">3. Project structure</a>
<ul>
<li><a href="#orgf080403">3.1. <code>sydml</code></a>
<ul>
<li><a href="#orgb13d1c4">3.1.1. <code>app</code></a></li>
<li><a href="#orgf212add">3.1.2. <code>src</code></a></li>
<li><a href="#orgf3cf20d">3.1.3. <code>test</code></a></li>
</ul>
</li>
<li><a href="#orgab18c2e">3.2. <code>presydml</code></a></li>
<li><a href="#org5592b7a">3.3. <code>vendor</code></a>
<ul>
<li><a href="#org71580b8">3.3.1. <code>tree-sitter</code></a></li>
<li><a href="#orge9c1634">3.3.2. <code>qbe</code></a></li>
<li><a href="#org3ee94d8">3.3.3. <code>compiler-explorer</code></a></li>
</ul>
</li>
<li><a href="#orgfae76da">3.4. <code>doc</code></a></li>
<li><a href="#org37b2936">3.5. <code>tree-sitter-sydml</code></a></li>
</ul>
</li>
<li><a href="#orgf0437b3">4. Compiler overview</a></li>
<li><a href="#orgf3e82f3">5. Languages</a>
<ul>
<li><a href="#org2d429db">5.1. The SydML language</a>
<ul>
<li><a href="#org658f43c">5.1.1. Syntax</a></li>
</ul>
</li>
<li><a href="#org2d02442">5.2. Core</a></li>
</ul>
</li>
<li><a href="#orgcfd10a4">6. Progress</a>
<ul>
<li><a href="#org3f637dd">6.1. Milestones</a>
<ul>
<li><a href="#orgf42efa6">6.1.1. <span class="done DONE">DONE</span> 0 Preemptive Planning <code>[6/6]</code></a></li>
<li><a href="#org1ffbff9">6.1.2. <span class="done DONE">DONE</span> 1 Research Toys <code>[7/7]</code></a></li>
<li><a href="#org536d570">6.1.3. <span class="todo TODO">TODO</span> 2 Layer 1 <code>[5/7]</code></a></li>
</ul>
</li>
<li><a href="#org12d44df">6.2. Other</a>
<ul>
<li><a href="#org2aaf841">6.2.1. Nix setup</a></li>
<li><a href="#orgd9e3e9e">6.2.2. Documentation</a></li>
<li><a href="#org2e23daf">6.2.3. GitHub Pages action</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org3460438">7. Resources</a>
<ul>
<li><a href="#org79eb537">7.1. Reference projects</a>
<ul>
<li><a href="#org21e4d00">7.1.1. sixten/sixty</a></li>
<li><a href="#orgce3fdfd">7.1.2. eclair</a></li>
<li><a href="#org002d5d9">7.1.3. hnix</a></li>
<li><a href="#orgd90bb19">7.1.4. Hécate — boreal</a></li>
<li><a href="#org0ba4b6f">7.1.5. elm</a></li>
<li><a href="#org9274234">7.1.6. purescript</a></li>
<li><a href="#org6816a62">7.1.7. MLton   <span class="tag"><span class="SML">SML</span></span></a></li>
<li><a href="#org69cbc90">7.1.8. Moscow ML   <span class="tag"><span class="SML">SML</span></span></a></li>
<li><a href="#orge939cbd">7.1.9. HaMLet   <span class="tag"><span class="SML">SML</span></span></a></li>
<li><a href="#org9e7cd55">7.1.10. amy</a></li>
<li><a href="#org84abcf6">7.1.11. Idris 2</a></li>
<li><a href="#orgba9d596">7.1.12. Essentials of Compilation</a></li>
</ul>
</li>
<li><a href="#org011b4bb">7.2. Parsing</a>
<ul>
<li><a href="#orgd39c49a">7.2.1. Efficient and Flexible Incremental Parsing</a></li>
<li><a href="#org2c8a447">7.2.2. Incremental Analysis of Real Programming Languages</a></li>
<li><a href="#org57f9041">7.2.3. Error Detection and Recovery in LR Parsers</a></li>
<li><a href="#org25b4b36">7.2.4. Automatic Error Recovery for LR Parsers</a></li>
<li><a href="#org6992d6d">7.2.5. Treesitter   <span class="tag"><span class="TALK">TALK</span></span></a></li>
<li><a href="#org2c02904">7.2.6. Treesitter   <span class="tag"><span class="TALK">TALK</span></span></a></li>
<li><a href="#orgfeed40a">7.2.7. Treesitter   <span class="tag"><span class="TALK">TALK</span></span></a></li>
</ul>
</li>
<li><a href="#org76dc075">7.3. IRs — SSA, ANF, and CPS</a>
<ul>
<li><a href="#orga5170b0">7.3.1. SSA vs ANF: source code, slides.</a></li>
<li><a href="#org0ede131">7.3.2. Reddit discussion about ANF between Hécate and Colin</a></li>
<li><a href="#org5389819">7.3.3. <span class="done _X_">[X]</span> Matt Might — A-Normalization: Why and How</a></li>
<li><a href="#org4e1d4e1">7.3.4. SSA is Functional Programming </a></li>
<li><a href="#orgf2b12c7">7.3.5. <span class="done _X_">[X]</span> How to compile with continuations</a></li>
<li><a href="#orgb6c79a2">7.3.6. Appel — Continuation Passing, Closure Passing Style</a></li>
<li><a href="#org2c1e92d">7.3.7. Compiling with Continuations and LLVM </a></li>
<li><a href="#org389d014">7.3.8. <span class="todo ___">[-]</span> Compiling without continuations</a></li>
<li><a href="#org563d402">7.3.9. Compiling with Continuations, Continued </a></li>
<li><a href="#org15cc02d">7.3.10. Slides implementing Compiling with Continuations, Continued </a></li>
<li><a href="#org700d482">7.3.11. Compiling with CPS</a></li>
<li><a href="#orgd100824">7.3.12. Original ANF paper: The Essence of Compiling with Continuations</a></li>
<li><a href="#org77c8f5a">7.3.13. Email discussing MLton’s IR and some history</a></li>
<li><a href="#org0affc51">7.3.14. Comparing CPS, ANF, and SSA for compiling functional languages</a></li>
<li><a href="#org82a339b">7.3.15. A Functional Perspective on SSA Optimisation Algorithms</a></li>
<li><a href="#org0ca3be5">7.3.16. The CPS/ANF saga</a></li>
<li><a href="#org2032945">7.3.17. Tarditi — Design and Implementation of Code Optimiziations for a Type-Directed Compiler for Standard ML (ANF)</a></li>
<li><a href="#org77cfd8c">7.3.18. Paper summarizing the Tarditi thesis</a></li>
<li><a href="#org4be0760">7.3.19. A Correspondence between CPS and SSA</a></li>
<li><a href="#org474bc29">7.3.20. <span class="done _X_">[X]</span> Colin — Compiling the λ-calculus</a></li>
</ul>
</li>
<li><a href="#org294b50e">7.4. Compiler Architecture</a>
<ul>
<li><a href="#orge3b3752">7.4.1. rustc demand-driven-compilation</a></li>
<li><a href="#orgbba960b">7.4.2. <span class="done _X_">[X]</span> Query-based compiler architectures</a></li>
<li><a href="#org903de33">7.4.3. <span class="done _X_">[X]</span> Three Architectures for a Responsive IDE</a></li>
<li><a href="#orgadcebe4">7.4.4. Practical Algorithms for Incremental Software Development Environments</a></li>
<li><a href="#org17dae43">7.4.5. Query-based compiler architectures   <span class="tag"><span class="TALK">TALK</span></span></a></li>
<li><a href="#orgfd22990">7.4.6. A journey through incremental computation   <span class="tag"><span class="TALK">TALK</span></span></a></li>
<li><a href="#orgd7aef0e">7.4.7. Making Fast Incremental Compiler for Huge Codebase   <span class="tag"><span class="TALK">TALK</span></span></a></li>
<li><a href="#org7749397">7.4.8. How to load 1m lines of Ruby in 5s   <span class="tag"><span class="TALK">TALK</span></span></a></li>
<li><a href="#org094a62e">7.4.9. Compilers are Databases   <span class="tag"><span class="TALK">TALK</span></span></a></li>
<li><a href="#org434b839">7.4.10. Anders Hejlsberg on Modern Compiler Construction   <span class="tag"><span class="TALK">TALK</span></span></a></li>
<li><a href="#org33747af">7.4.11. Responsive compilers   <span class="tag"><span class="TALK">TALK</span></span></a></li>
</ul>
</li>
<li><a href="#orgaf5c756">7.5. Miscellaneous</a>
<ul>
<li><a href="#org77a4268">7.5.1. <span class="todo ___">[-]</span> Lessons from Writing a Compiler</a></li>
<li><a href="#org9d8bad0">7.5.2. <span class="done _X_">[X]</span> Matt Might — Closure Conversion</a></li>
<li><a href="#org39a8b9d">7.5.3. Towards a practical programming language based on dependent type theory</a></li>
<li><a href="#orgb276079">7.5.4. Implementing a JIT Compiled Language with Haskell and LLVM</a></li>
<li><a href="#org9b4d196">7.5.5. <span class="done _X_">[X]</span> Build systems à la carte: Theory and Practice</a></li>
<li><a href="#org6eb803a">7.5.6. A Reddit thread about functional IRs</a></li>
<li><a href="#org9307811">7.5.7. Making a Fast Curry: Push/Enter vs. Eval/Apply for Higher-order Languages</a></li>
<li><a href="#orgcdf9d1c">7.5.8. Custom Cabal builds</a></li>
<li><a href="#org452823f">7.5.9. Nix tree-sitter examples</a></li>
<li><a href="#orgddaf56b">7.5.10. Tarditi — No Assembly Required: Compiling SML to C</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-orgf86c3f1" class="outline-2">
<h2 id="orgf86c3f1"><span class="section-number-2">1.</span> About</h2>
<div class="outline-text-2" id="text-1">
<p>
SydML is currently planned to be a functional programming language with strict
semantics.
</p>
<p>
Github renders this document very poorly, which conflicts with my style of
organisation. See the rendered HTML <a href="https://crumbtoo.github.io/sydml">here</a>.
</p>
</div>
</div>
<div id="outline-container-orgdf873bb" class="outline-2">
<h2 id="orgdf873bb"><span class="section-number-2">2.</span> Motivation</h2>
<div class="outline-text-2" id="text-2">
</div>
<div id="outline-container-org83ac9cc" class="outline-3">
<h3 id="org83ac9cc"><span class="section-number-3">2.1.</span> Demonstrate that I’ve learned from last year’s failures</h3>
<div class="outline-text-3" id="text-2-1">
<p>
The entire project collapsed at the last minute, likely as a result of the
following points.
</p>
</div>
<div id="outline-container-org2aa9716" class="outline-4">
<h4 id="org2aa9716"><span class="section-number-4">2.1.1.</span> Very poor planning.</h4>
<div class="outline-text-4" id="text-2-1-1">
<p>
A lack of thorough planning led to extreme unstability, ultimately leaving me
with a broken compiler days before the project was due.
</p>
<p>
To prevent this, I intend to <i>thoroughly</i> architect the compiler and each pass
beforehand, down to the individual signatures of key components. This plan would
be sure to account for not only high-level passes, but also
</p>
<ul class="org-ul">
<li>where errors are thrown and caught,</li>
<li>how line and column information is retained,</li>
</ul>
</div>
</div>
<div id="outline-container-org0d68e81" class="outline-4">
<h4 id="org0d68e81"><span class="section-number-4">2.1.2.</span> Not enough testing.</h4>
<div class="outline-text-4" id="text-2-1-2">
<p>
The volatile codebase did not mesh will with my tests against internal APIs. The
few tests that I had could not keep up with the rapidly-changing code, and often
didn’t even compile.
</p>
<p>
To address this, tests will be written against a stable command-line interface,
treating the entire compiler as a black box.
</p>
<ul class="org-ul">
<li>I plan on following a <i>Golden testing</i> model.</li>
<li>For source–to-machine-code compilations, this is a straightforward check that
an example input matches an output file, bit-for-bit.</li>
<li>Testing other functions, such as type-checking, will require serialisation to
(JSON|S-expressions), which is useful feature for debugging in any case.</li>
<li>Github CI/CD.</li>
</ul>
</div>
</div>
</div>
<div id="outline-container-orgb89f925" class="outline-3">
<h3 id="orgb89f925"><span class="section-number-3">2.2.</span> New goals</h3>
<div class="outline-text-3" id="text-2-2">
<p>
While last year’s compiler was primarily language-focused, I now intend to focus
on compiler techniques.
</p>
</div>
<div id="outline-container-org5d6852f" class="outline-4">
<h4 id="org5d6852f"><span class="section-number-4">2.2.1.</span> IRs — ANF and SSA</h4>
</div>
</div>
</div>
<div id="outline-container-org888ae9c" class="outline-2">
<h2 id="org888ae9c"><span class="section-number-2">3.</span> Project structure</h2>
<div class="outline-text-2" id="text-3">
</div>
<div id="outline-container-orgf080403" class="outline-3">
<h3 id="orgf080403"><span class="section-number-3">3.1.</span> <code>sydml</code></h3>
<div class="outline-text-3" id="text-3-1">
</div>
<div id="outline-container-orgb13d1c4" class="outline-4">
<h4 id="orgb13d1c4"><span class="section-number-4">3.1.1.</span> <code>app</code></h4>
</div>
<div id="outline-container-orgf212add" class="outline-4">
<h4 id="orgf212add"><span class="section-number-4">3.1.2.</span> <code>src</code></h4>
</div>
<div id="outline-container-orgf3cf20d" class="outline-4">
<h4 id="orgf3cf20d"><span class="section-number-4">3.1.3.</span> <code>test</code></h4>
</div>
</div>
<div id="outline-container-orgab18c2e" class="outline-3">
<h3 id="orgab18c2e"><span class="section-number-3">3.2.</span> <code>presydml</code></h3>
</div>
<div id="outline-container-org5592b7a" class="outline-3">
<h3 id="org5592b7a"><span class="section-number-3">3.3.</span> <code>vendor</code></h3>
<div class="outline-text-3" id="text-3-3">
<p>
Vendored dependencies.
</p>
</div>
<div id="outline-container-org71580b8" class="outline-4">
<h4 id="org71580b8"><span class="section-number-4">3.3.1.</span> <code>tree-sitter</code></h4>
<div class="outline-text-4" id="text-3-3-1">
<p>
The tree-sitter bindings for Haskell leave a lot to be desired. My patches
include the following:
</p>
<ul class="org-ul">
<li>Add binding to <code>ts_node_string()</code>.</li>
<li>Add bindings to the “edit” API.</li>
</ul>
</div>
</div>
<div id="outline-container-orge9c1634" class="outline-4">
<h4 id="orge9c1634"><span class="section-number-4">3.3.2.</span> <code>qbe</code></h4>
<div class="outline-text-4" id="text-3-3-2">
<p>
This library provides a Haskell representation of QBE’s IL. Patches include the
following:
</p>
<ul class="org-ul">
<li>Bump the version bounds of <code>base</code>, <code>text</code>, <code>bytestring</code>, and <code>deepseq</code>.</li>
<li>Add support for allocation instructions. This patch is the work of <a href="https://todo.sr.ht/~fgaz/qbe-hs/1">Ellis
Kesterton</a>, whose merge request to <code>qbe-hs</code> has been idle upstream for over a
year.</li>
</ul>
</div>
</div>
<div id="outline-container-org3ee94d8" class="outline-4">
<h4 id="org3ee94d8"><span class="section-number-4">3.3.3.</span> <code>compiler-explorer</code></h4>
<div class="outline-text-4" id="text-3-3-3">
<p>
A tool for viewing compiler output and IRS. My patches include:
</p>
<ul class="org-ul">
<li>Add a Nix flake.</li>
<li>Add support for presydml.</li>
</ul>
</div>
</div>
</div>
<div id="outline-container-orgfae76da" class="outline-3">
<h3 id="orgfae76da"><span class="section-number-3">3.4.</span> <code>doc</code></h3>
<div class="outline-text-3" id="text-3-4">
<p>
Documentation. Currently, this solely serves as a home for the rendered HTML of the README.
</p>
</div>
</div>
<div id="outline-container-org37b2936" class="outline-3">
<h3 id="org37b2936"><span class="section-number-3">3.5.</span> <code>tree-sitter-sydml</code></h3>
<div class="outline-text-3" id="text-3-5">
<p>
Houses Sydc’s parser.
</p>
</div>
</div>
</div>
<div id="outline-container-orgf0437b3" class="outline-2">
<h2 id="orgf0437b3"><span class="section-number-2">4.</span> Compiler overview</h2>
<div class="outline-text-2" id="text-4">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left"><b>Pass</b></th>
<th scope="col" class="org-left"><b>Produced IL</b></th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">Sydc</td>
<td class="org-left"> </td>
</tr>
</tbody>
<tbody>
<tr>
<td class="org-left"> </td>
<td class="org-left">Source</td>
</tr>
<tr>
<td class="org-left">Parse</td>
<td class="org-left">Tree-sitter AST</td>
</tr>
<tr>
<td class="org-left">Reparse</td>
<td class="org-left">AST</td>
</tr>
<tr>
<td class="org-left">Elaborate</td>
<td class="org-left">Core</td>
</tr>
<tr>
<td class="org-left">Type-check</td>
<td class="org-left">Typed Core</td>
</tr>
<tr>
<td class="org-left">Rename</td>
<td class="org-left">Typed Unique Core</td>
</tr>
<tr>
<td class="org-left">Closure-convert</td>
<td class="org-left">Typed Unique Core</td>
</tr>
<tr>
<td class="org-left">Hoist</td>
<td class="org-left">Typed Unique Core</td>
</tr>
<tr>
<td class="org-left">LowerANF</td>
<td class="org-left">ANF</td>
</tr>
<tr>
<td class="org-left">LowerSSA</td>
<td class="org-left">SSA</td>
</tr>
<tr>
<td class="org-left">ToQBE</td>
<td class="org-left">QBE</td>
</tr>
<tr>
<td class="org-left">RenderQBE</td>
<td class="org-left">Text</td>
</tr>
</tbody>
<tbody>
<tr>
<td class="org-left">External</td>
<td class="org-left"> </td>
</tr>
</tbody>
<tbody>
<tr>
<td class="org-left">qbe</td>
<td class="org-left">Assembly</td>
</tr>
<tr>
<td class="org-left">cc</td>
<td class="org-left">Machine</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="outline-container-orgf3e82f3" class="outline-2">
<h2 id="orgf3e82f3"><span class="section-number-2">5.</span> Languages</h2>
<div class="outline-text-2" id="text-5">
</div>
<div id="outline-container-org2d429db" class="outline-3">
<h3 id="org2d429db"><span class="section-number-3">5.1.</span> The SydML language</h3>
<div class="outline-text-3" id="text-5-1">
</div>
<div id="outline-container-org658f43c" class="outline-4">
<h4 id="org658f43c"><span class="section-number-4">5.1.1.</span> Syntax</h4>
<div class="outline-text-4" id="text-5-1-1">
<ul class="org-ul">
<li>We use Haskell-style layouts, meaning that one can group productions by either
alignment, or semicolons and braces.</li>
</ul>
</div>
</div>
</div>
<div id="outline-container-org2d02442" class="outline-3">
<h3 id="org2d02442"><span class="section-number-3">5.2.</span> Core</h3>
<div class="outline-text-3" id="text-5-2">
<p>
Core is an explicitly-typed IL based on System F<sub>ω</sub>. Internally
</p>
<div class="org-src-container">
<pre class="src src-fundamental">e ::= x Variables
| λx:τ. e Term abstractions
| Λx:κ. e Type abstractions
| e e Term applications
| e @τ Type applications
| let x = e in e Let-bindings
| letrec (x = e)* in e Recursive let-bindings
τ ::= K Type constructors
| τ τ Constructor application
| τ → τ Function types
| ∀x:k. τ Universal quantification
k ::= Type The kind of all types
| k → k Higher kinds
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgcfd10a4" class="outline-2">
<h2 id="orgcfd10a4"><span class="section-number-2">6.</span> Progress</h2>
<div class="outline-text-2" id="text-6">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 1:</span> Clock summary at <span class="timestamp-wrapper"><span class="timestamp">[2024-09-08 Sun 23:18]</span></span></caption>
<colgroup>
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">Headline</th>
<th scope="col" class="org-left">Time</th>
<th scope="col" class="org-left"> </th>
<th scope="col" class="org-left"> </th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left"><b>Total time</b></td>
<td class="org-left"><b>2d 9:25</b></td>
<td class="org-left"> </td>
<td class="org-left"> </td>
</tr>
</tbody>
<tbody>
<tr>
<td class="org-left">Progress</td>
<td class="org-left">2d 9:25</td>
<td class="org-left"> </td>
<td class="org-left"> </td>
</tr>
<tr>
<td class="org-left">  Milestones</td>
<td class="org-left"> </td>
<td class="org-left">1d 22:34</td>
<td class="org-left"> </td>
</tr>
<tr>
<td class="org-left">    0 Preemptive Planning [6/6]</td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left">5:29</td>
</tr>
<tr>
<td class="org-left">    1 Research Toys [7/7]</td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left">1d 17:05</td>
</tr>
<tr>
<td class="org-left">  Other</td>
<td class="org-left"> </td>
<td class="org-left">10:51</td>
<td class="org-left"> </td>
</tr>
<tr>
<td class="org-left">    Nix setup</td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left">7:26</td>
</tr>
<tr>
<td class="org-left">    Documentation</td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left">1:44</td>
</tr>
<tr>
<td class="org-left">    GitHub Pages action</td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left">0:26</td>
</tr>
</tbody>
</table>
</div>
<div id="outline-container-org3f637dd" class="outline-3">
<h3 id="org3f637dd"><span class="section-number-3">6.1.</span> Milestones</h3>
<div class="outline-text-3" id="text-6-1">
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left"><b>Milestone</b></th>
<th scope="col" class="org-left">Parser</th>
<th scope="col" class="org-left">Elab</th>
<th scope="col" class="org-left">Type-checker</th>
<th scope="col" class="org-left">->ANF</th>
<th scope="col" class="org-left">Closure-conv.</th>
<th scope="col" class="org-left">Hoist</th>
<th scope="col" class="org-left">->QBE</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">Empty module</td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
</tr>
<tr>
<td class="org-left">Int literal decl</td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
</tr>
<tr>
<td class="org-left">if 1 then 2 else 3</td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
</tr>
<tr>
<td class="org-left">The identity fn</td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
<td class="org-left"> </td>
</tr>
</tbody>
</table>
</div>
<div id="outline-container-orgf42efa6" class="outline-4">
<h4 id="orgf42efa6"><span class="section-number-4">6.1.1.</span> <span class="done DONE">DONE</span> 0 Preemptive Planning <code>[6/6]</code></h4>
<div class="outline-text-4" id="text-6-1-1">
<p>
DEADLINE: <span class="timestamp-wrapper"><span class="timestamp"><2024-09-03 Tue></span></span>
</p>
</div>
<ol class="org-ol">
<li><a id="org446811c"></a><span class="done DONE">DONE</span> MLton-esque overview.<br /></li>
<li><a id="org95969d7"></a><span class="done DONE">DONE</span> Create a skeleton project.<br /></li>
<li><a id="org6271138"></a><span class="done DONE">DONE</span> Milestone table.<br /></li>
<li><a id="org43d2aa8"></a><span class="done DONE">DONE</span> Define a CLI.<br /></li>
<li><a id="org82b07b6"></a><span class="done DONE">DONE</span> Write tests for empty files.<br />
<div class="outline-text-5" id="text-6-1-1-5">
<ul class="org-ul">
<li>Current blocker: I’m not sure how to uniformly run tests both against
black-box executables, as well as typical unit tests. Ideally, both would be
run by <code>cabal test</code>.</li>
<li><p>
Potential solution:
</p>
<div class="org-src-container">
<pre class="src src-diff"> main :: IO ()
<span style="color: #aa2222; background-color: #553333;">-</span><span style="background-color: #553333;"> main = ...</span>
<span style="color: #22aa22; background-color: #335533;">+</span><span style="background-color: #335533;"> main = getArgs >>= main'</span>
<span style="color: #22aa22; background-color: #335533;">+</span><span style="background-color: #335533;"> main' :: List String -> IO ()</span>
<span style="color: #22aa22; background-color: #335533;">+</span><span style="background-color: #335533;"> main' xs = do</span>
<span style="color: #22aa22; background-color: #335533;">+</span><span style="background-color: #335533;"> opts <- execParserPure _ _</span>
+ ...
</pre>
</div></li>
</ul>
</div>
</li>
<li><a id="orgb2d12f9"></a><span class="done DONE">DONE</span> Define Milestone 2.<br /></li>
</ol>
</div>
<div id="outline-container-org1ffbff9" class="outline-4">
<h4 id="org1ffbff9"><span class="section-number-4">6.1.2.</span> <span class="done DONE">DONE</span> 1 Research Toys <code>[7/7]</code></h4>
<div class="outline-text-4" id="text-6-1-2">
<p>
Implement the core algorithms as toys with toothpick scaffolding.
</p>
<ul class="org-ul">
<li>After implementing closure-conversion, I think it may be a good idea to
initially work uncurried by default, à la SML, and implement the necessary
optimisations for curry-heavy code later.</li>
<li>The value of statically-typed IRs is not to be undermined.</li>
<li class="on"><code>[X]</code> <p>
Known issue: There is some problem with closure conversion. Try compiling:
</p>
<div class="org-src-container">
<pre class="src src-ghci">λ> pretty . upToConvert $ Lam.Prim $ PrimPrintInt $ Lam.zCombinator `Lam.App` ((Lam.Lam "x" $ Lam.Lam "y" $ Lam.Var "x") `Lam.App` Lam.IntVal 3)
</pre>
</div></li>
</ul>
</div>
<ol class="org-ol">
<li><a id="orgecbe740"></a><span class="done DONE">DONE</span> The Untyped λ-calculus<br />
<div class="outline-text-5" id="text-6-1-2-1">
<ul class="org-ul">
<li>Augmented with tuples.</li>
</ul>
</div>
</li>
<li><a id="org1418919"></a><span class="done DONE">DONE</span> Rename<br /></li>
<li><a id="orgaa85898"></a><span class="done DONE">DONE</span> LowerANF<br /></li>
<li><a id="org1f95cd9"></a><span class="done DONE">DONE</span> Closure-convert<br />
<div class="outline-text-5" id="text-6-1-2-4">
</div>
</li>
<li><a id="org149c1db"></a><span class="done DONE">DONE</span> Hoist<br />
<div class="outline-text-5" id="text-6-1-2-5">
</div>
</li>
<li><a id="org450a89f"></a><span class="done DONE">DONE</span> ToQBE<br />
<div class="outline-text-5" id="text-6-1-2-6">
<ul class="org-ul">
<li><p>
As of <a href="https://github.com/crumbtoo/sydml/commit/1342b377e9dfceda86831548eb39466830ac6ef5">this commit</a>, the toy compiler can compile its first program:
</p>
<div class="org-src-container">
<pre class="src src-ghci">λ> :m + *Presydc.SSA
λ> writePipeline "/tmp/t/t.qbe" $ Lam.IntVal 123
</pre>
</div>
<div class="org-src-container">
<pre class="src src-shell"><span style="color: #FF5D62;">$</span> <span style="color: #E6C384;">nix</span>-shell <span style="color: #FFA066;">-p</span> qbe gcc
<span style="color: #9CABCA;">[</span>nix-shell<span style="color: #9CABCA;">]</span><span style="color: #FF5D62;">$</span> <span style="color: #E6C384;">qbe</span> t.qbe <span style="color: #D27E99; font-weight: bold;">></span> t.s <span style="color: #D27E99; font-weight: bold;">&&</span> <span style="color: #9CABCA;">gcc</span> t.s <span style="color: #FFA066;">-o</span> t
<span style="color: #9CABCA;">[</span>nix-shell<span style="color: #9CABCA;">]</span>$ ./t <span style="color: #D27E99; font-weight: bold;">;</span> <span style="color: #FF5D62; background-color: #43242B; font-style: italic;">echo</span> <span style="color: #FF5D62;">$</span><span style="color: #FFA066;">?</span>
<span style="color: #E6C384;">123</span>
</pre>
</div></li>
<li><p>
As of <a href="https://github.com/crumbtoo/sydml/commit/acf74f12dc4327efce54610e5e1ffb81d57a5eba">this commit</a>, it can compile arithmetic primitives and impure <code>print</code> calls:
</p>
<div class="org-src-container">
<pre class="src src-ghci">λ> :m + *Presydc.SSA
λ> writePipeline "/tmp/t/t.qbe" $ Lam.Prim $ PrimPrintInt $ Lam.Prim $ Lam.PrimAdd (Lam.IntVal 2) (Lam.IntVal 3)
</pre>
</div>
<div class="org-src-container">
<pre class="src src-shell"><span style="color: #FF5D62;">$</span> <span style="color: #E6C384;">nix</span>-shell <span style="color: #FFA066;">-p</span> qbe gcc
<span style="color: #9CABCA;">[</span>nix-shell<span style="color: #9CABCA;">]</span><span style="color: #FF5D62;">$</span> <span style="color: #E6C384;">qbe</span> t.qbe <span style="color: #D27E99; font-weight: bold;">></span> t.s <span style="color: #D27E99; font-weight: bold;">&&</span> <span style="color: #9CABCA;">gcc</span> t.s <span style="color: #FFA066;">-o</span> t
<span style="color: #9CABCA;">[</span>nix-shell<span style="color: #9CABCA;">]</span>$ <span style="color: #9CABCA;">./t</span>
<span style="color: #E6C384;">5</span>
</pre>
</div></li>
<li><p>
As of <a href="https://github.com/crumbtoo/sydml/commit/6379d5647e89414331949f3206d3cdb1af2f9223">this commit</a>, it can compile trivial conditional expressions:
</p>
<div class="org-src-container">
<pre class="src src-ghci">λ> writePipeline "/tmp/t/t.qbe" $ Lam.IfThenElse (Lam.IntVal 1) (Lam.IntVal 2) (Lam.IntVal 3)
</pre>
</div>
<div class="org-src-container">
<pre class="src src-shell"><span style="color: #9CABCA;">[</span>nix-shell<span style="color: #9CABCA;">]</span><span style="color: #FF5D62;">$</span> <span style="color: #E6C384;">qbe</span> t.qbe <span style="color: #D27E99; font-weight: bold;">></span> t.s <span style="color: #D27E99; font-weight: bold;">&&</span> <span style="color: #9CABCA;">gcc</span> t.s <span style="color: #FFA066;">-o</span> t
<span style="color: #9CABCA;">[</span>nix-shell<span style="color: #9CABCA;">]</span>$ ./t <span style="color: #D27E99; font-weight: bold;">;</span> <span style="color: #FF5D62; background-color: #43242B; font-style: italic;">echo</span> <span style="color: #FF5D62;">$</span><span style="color: #FFA066;">?</span>
<span style="color: #E6C384;">2</span>
</pre>
</div></li>
<li><p>
As of <a href="https://github.com/crumbtoo/sydml/commit/08ef987a563eabb199610a26546305dcbb6dd76a">this commit</a>, the factorial program sucessfully compiles and executes.
Two hidden bugs were fixed in the process:
</p>
<ul class="org-ul">
<li><p>
<code>freeVars</code> did not function as expects on application nodes.
</p>
<div class="org-src-container">
<pre class="src src-diff"> freeVars (LetApp x f ys m) = toHashSetOf (each . #Var) ys
<span style="color: #22aa22; background-color: #335533;">+</span><span style="background-color: #335533;"> <> HS.singleton f</span>
<> (freeVars m & HS.delete x)
</pre>
</div></li>
<li><p>
Three typos in the <code>hoist</code> function led to both branches of an if-expression
being the unhoisted ’true’ branch — I have no idea how this happened. :P
</p>
<div class="org-src-container">
<pre class="src src-diff"> go (IfThenElse c t f) = do
Hoisted fs js t' <- go t
<span style="color: #aa2222; background-color: #553333;">-</span><span style="background-color: #553333;"> Hoisted fs' js' t' <- go f</span>
<span style="color: #22aa22; background-color: #335533;">+</span><span style="background-color: #335533;"> Hoisted fs' js' f' <- go f</span>
(th,el) <- each mkFresh ("then","else")
<span style="color: #aa2222; background-color: #553333;">-</span><span style="background-color: #553333;"> let bt = Join th Nothing t</span>
<span style="color: #22aa22; background-color: #335533;">+</span><span style="background-color: #335533;"> let bt = Join th Nothing t'</span>
<span style="color: #aa2222; background-color: #553333;">-</span><span style="background-color: #553333;"> bf = Join el Nothing t</span>
<span style="color: #22aa22; background-color: #335533;">+</span><span style="background-color: #335533;"> bf = Join el Nothing f'</span>
pure $ Hoisted (fs >< fs') (Seq.fromList [bt,bf] >< js >< js') $
IfThenElse c (Jump th Nothing) (Jump el Nothing)
</pre>
</div></li>
</ul>
<div class="org-src-container">
<pre class="src src-ghci">-- (λf. (λx. f (λv. x x v)) (λx. f (λv. x x v))) (λ rec n. if n then n * rec (n - 1) else 1) 3
)
λ> writePipeline "/tmp/t/t.qbe" $ Lam.Prim $ PrimPrintInt $ Lam.zCombinator `Lam.App` (Lam.Lam "rec" $ Lam.Lam "n" $ Lam.IfThenElse (Lam.Var "n") (Lam.Prim $ PrimMul (Lam.Var "n") (Lam.Var "rec" `Lam.App` (Lam.Prim $ PrimSub (Lam.Var "n") (Lam.IntVal 1)))) (Lam.IntVal 1)) `Lam.App` Lam.IntVal 3
</pre>
</div></li>
<li><p>
As of <a href="https://github.com/crumbtoo/sydml/commit/e27f4664af156d3862100e21c4396423165e8469">this commit</a>, it can compile closures and applications thereupon,
marking the completion of the ToQBE pass!
</p>
<div class="org-src-container">
<pre class="src src-ghci">λ> writePipeline "/tmp/t/t.qbe" $ Lam.Prim $ PrimPrintInt $ (Lam.Lam "x" $ Lam.Lam "y" $ Lam.Var "x") `Lam.App` Lam.IntVal 1 `Lam.App` Lam.IntVal 2
</pre>
</div>
<div class="org-src-container">
<pre class="src src-shell"><span style="color: #9CABCA;">[</span>nix-shell<span style="color: #9CABCA;">]</span><span style="color: #FF5D62;">$</span> <span style="color: #E6C384;">qbe</span> t.qbe <span style="color: #D27E99; font-weight: bold;">></span> t.s <span style="color: #D27E99; font-weight: bold;">&&</span> <span style="color: #9CABCA;">gcc</span> t.s <span style="color: #FFA066;">-o</span> t
<span style="color: #9CABCA;">[</span>nix-shell<span style="color: #9CABCA;">]</span>$ <span style="color: #9CABCA;">./t</span>
<span style="color: #E6C384;">1</span>
</pre>
</div></li>
</ul>
</div>
</li>
<li><a id="orga3b827a"></a><span class="done DONE">DONE</span> Demo<br />
<div class="outline-text-5" id="text-6-1-2-7">
<ul class="org-ul">
<li>Maybe using <a href="https://github.com/compiler-explorer/compiler-explorer/blob/main/docs/AddingACompiler.md">godbolt</a>?</li>
</ul>
</div>
</li>
</ol>
</div>
<div id="outline-container-org536d570" class="outline-4">
<h4 id="org536d570"><span class="section-number-4">6.1.3.</span> <span class="todo TODO">TODO</span> 2 Layer 1 <code>[5/7]</code></h4>
<div class="outline-text-4" id="text-6-1-3">
<p>
Round three of planning. Define the core data structures, signatures for
functions between them, and tests for those functions.
</p>
</div>
<ol class="org-ol">
<li><a id="org596c8b8"></a><span class="done DONE">DONE</span> Big decisions!<br />
<div class="outline-text-5" id="text-6-1-3-1">
</div>
<ol class="org-ol">
<li><a id="org6ba59b0"></a><span class="done NO">NO</span> Side effects?<br />
<div class="outline-text-6" id="text-6-1-3-1-1">
<p>
Decided against, primarily due to top-level side-effects.
</p>
</div>
<ol class="org-ol">
<li><a id="orgee6caaa"></a>Impure<br />
<ol class="org-ol">
<li><a id="orgb7debe8"></a>Pros<br />
<div class="outline-text-8" id="text-6-1-3-1-1-1-1">
<ul class="org-ul">
<li>Rely less on optimisations — use <code>ref</code> types.</li>
<li>Easy implementation.</li>
</ul>
</div>
</li>
<li><a id="org4b80fc9"></a>Cons<br />
<div class="outline-text-8" id="text-6-1-3-1-1-1-2">
<ul class="org-ul">
<li>Top-level side effects lead to a lot of pain in implementation and use.</li>
</ul>
</div>
</li>
</ol>
</li>
<li><a id="orgdfa7e0a"></a>Pure<br />
<ol class="org-ol">
<li><a id="org4211e41"></a>Pros<br />
<div class="outline-text-8" id="text-6-1-3-1-1-2-1">
<ul class="org-ul">
<li>I have Haskellbrain.</li>
<li>More interesting implementation.</li>
</ul>
</div>
</li>
<li><a id="org09f6f58"></a>Cons<br />
<div class="outline-text-8" id="text-6-1-3-1-1-2-2">
<ul class="org-ul">
<li>Potentially complicated to make effecient.</li>
</ul>
</div>
</li>
</ol>
</li>
</ol>
</li>
<li><a id="org527537c"></a><span class="done OKAY">OKAY</span> ML Modules?<br />
<div class="outline-text-6" id="text-6-1-3-1-2">
<p>
We can postpone this thought.
</p>
</div>
</li>
</ol>
</li>
<li><a id="org809fca0"></a><span class="done DONE">DONE</span> Core data structures <code>[9/9]</code><br />
<div class="outline-text-5" id="text-6-1-3-2">
</div>
<ol class="org-ol">
<li><a id="org1dfa043"></a><span class="done DONE">DONE</span> <code>Syd</code> monad<br />
<div class="outline-text-6" id="text-6-1-3-2-1">
</div>
</li>
<li><a id="orge97fbf3"></a><span class="done DONE">DONE</span> Error effect and ADT<br />
<div class="outline-text-6" id="text-6-1-3-2-2">
</div>
</li>
<li><a id="orga71c1ff"></a><span class="done DONE">DONE</span> <code>Located</code><br />
<div class="outline-text-6" id="text-6-1-3-2-3">
</div>
</li>
<li><a id="orgde93152"></a><span class="done DONE">DONE</span> Surface AST<br />
<div class="outline-text-6" id="text-6-1-3-2-4">
</div>
</li>
<li><a id="org0d8ade5"></a><span class="done DONE">DONE</span> Core AST<br />
<div class="outline-text-6" id="text-6-1-3-2-5">
</div>
</li>
<li><a id="orgb61183f"></a><span class="done DONE">DONE</span> ANF AST<br />
<div class="outline-text-6" id="text-6-1-3-2-6">
</div>
</li>
<li><a id="orgafe23d5"></a><span class="done KILL">KILL</span> Closure-converted AST<br />
<div class="outline-text-6" id="text-6-1-3-2-7">
</div>
</li>
<li><a id="org5474ac9"></a><span class="done KILL">KILL</span> Hoisted AST<br />
<div class="outline-text-6" id="text-6-1-3-2-8">
</div>
</li>
<li><a id="orgc8bcf71"></a><span class="done KILL">KILL</span> CodeGen record à la <a href="https://github.com/idris-lang/Idris2/blob/5459e1726582c7326c3846bd98dfaeb9ac25cdfc/src/Compiler/Common.idr#L38">Idris</a><br />
<div class="outline-text-6" id="text-6-1-3-2-9">
</div>
</li>
</ol>
</li>
<li><a id="orgf7ef36c"></a><span class="done DONE">DONE</span> Pass signatures <code>[6/6]</code><br />
<div class="outline-text-5" id="text-6-1-3-3">
</div>
<ol class="org-ol">
<li><a id="org22b303a"></a><span class="done DONE">DONE</span> Parse<br />
<div class="outline-text-6" id="text-6-1-3-3-1">
</div>
</li>
<li><a id="orgd93e554"></a><span class="done DONE">DONE</span> Elaborate<br />
<div class="outline-text-6" id="text-6-1-3-3-2">
</div>
</li>
<li><a id="org3579b8e"></a><span class="done DONE">DONE</span> TypeCheck<br />
<div class="outline-text-6" id="text-6-1-3-3-3">
</div>
</li>
<li><a id="orgd1c5c3e"></a><span class="done DONE">DONE</span> ClosureConvert<br />
<div class="outline-text-6" id="text-6-1-3-3-4">
</div>
</li>
<li><a id="orgce3af26"></a><span class="done DONE">DONE</span> Hoist<br />
<div class="outline-text-6" id="text-6-1-3-3-5">
</div>
</li>
<li><a id="org2fde6de"></a><span class="done DONE">DONE</span> ToQBE<br />
<div class="outline-text-6" id="text-6-1-3-3-6">
</div>
</li>
</ol>