Commit Graph

102 Commits

Author SHA1 Message Date
Emi Simpson 25e9fb8fcf
Organize the module tree a little 2024-03-17 13:43:15 -04:00
Emi Simpson f7420c7852
Added an asciicast demo 2024-03-17 11:44:19 -04:00
Emi Simpson e3ab0e26d3
Add an example section to the README 2024-03-17 10:53:04 -04:00
Emi Simpson 1d8fdb1a81
Simplify code generation for a top-level recursive function 2024-03-17 10:35:55 -04:00
Emi Simpson 23ef1f1228
Reverse output order for rendering ReplHole code generation 2024-03-17 10:21:12 -04:00
Emi Simpson 6a598e3856
Add a slow_fibb example 2024-03-17 10:20:20 -04:00
Emi Simpson 2479dbd9a6
Expand let elimination to work on some simple expression types regardless of use count 2024-03-17 10:19:50 -04:00
Emi Simpson 67a7bbc821
Make '$' variables globally unique 2024-03-17 10:12:02 -04:00
Emi Simpson a673db77ca
BUG: Codegen optimization for + failed to fire 2024-03-17 10:00:56 -04:00
Emi Simpson 656b44e18f
Hide buggy ReplHole feature from README 2024-03-17 09:50:39 -04:00
Emi Simpson 482547fea9
Remove some debug statements 2024-03-17 09:48:12 -04:00
Emi Simpson 864d98638e
OPTIMIZATION: Turn additions of constants to PLUS_CONST, eliminate PLUS_CONST(0)s 2024-03-17 09:46:31 -04:00
Emi Simpson 4f39a88f47
BUG: Optimizations don't penetrate applications and repl holes 2024-03-17 09:45:59 -04:00
Emi Simpson a2b68cc73e
Optimization: Collapse consecutive constant additions 2024-03-17 09:09:04 -04:00
Emi Simpson 37c809f5c0
Restructure how builtins work to improve inspectability 2024-03-17 09:03:23 -04:00
Emi Simpson b0ccfc6309
Optimization: Special case for simplying recursive let bindings codegen 2024-03-16 22:23:06 -04:00
Emi Simpson 6f89dfa1c5
Optimization: Remove redundant let expressions 2024-03-16 22:21:02 -04:00
Emi Simpson 719de87ea9
Perform match elimination at IR generation rather than codegen 2024-03-16 19:42:09 -04:00
Emi Simpson e6d8933ccf
BUG: Substitution does not penetrate Switch expressions 2024-03-16 18:08:40 -04:00
Emi Simpson 55fa7add0e
Add special case to improve quality of generated code for simple functions 2024-03-16 09:36:30 -04:00
Emi Simpson 79deebabf4
Fix bug: Recursion shares a single variable between all stack frames when compiling to JS 2024-03-16 09:18:41 -04:00
Emi Simpson 2238d363e5
Generate slightly smaller code for switch and let 2024-03-15 20:21:48 -04:00
Emi Simpson cd87c0fc08
Don't include `fibb_helper` in the produced bindings for the fibbonacci example 2024-03-15 20:21:48 -04:00
Emi Simpson 1f959551fc
Add compilation instructions to README 2024-03-15 20:21:48 -04:00
Emi Simpson 237c83f511
Fix bug: Switch statements crash when switching to the fallback branch 2024-03-15 20:21:48 -04:00
Emi Simpson f04553ac4d
Clean up some type errors
And in doing so, fix some real errors and remove some unused code
2024-03-15 20:21:47 -04:00
Emi Simpson 7b59e21183
Improve compilation output for builtins in special contexts 2024-03-15 20:21:47 -04:00
Emi Simpson fbcbe0215a
Hide builtins from compilation output 2024-03-15 20:21:47 -04:00
Emi Simpson 9dda964aca
Make fibb.json generate bindings rather than a function 2024-03-15 20:21:47 -04:00
Emi Simpson d0ebd8cfa5
Make compiled bindings const 2024-03-15 20:21:46 -04:00
Emi Simpson 666488ce0f
Fixed match tree merges creating ambiguous trees
Now match tree merging favors the most specific match possible
2024-03-15 20:21:46 -04:00
Emi Simpson 88399fff69
Implement compilation 2024-03-15 20:21:46 -04:00
Emi Simpson 673292e913
Add a README 2024-03-15 20:21:46 -04:00
Emi Simpson aa93a85d7c
Add missing import 2024-03-15 20:21:45 -04:00
Emi Simpson 79c503678e
Added merge_with 2024-03-15 20:21:45 -04:00
Emi Simpson 8f69581893
Pair down generated js a bit 2024-03-15 20:21:45 -04:00
Emi Simpson cdf33bd6da
Add compilation to JavaScript 2024-03-15 20:21:45 -04:00
Emi Simpson f5d999a3dd
Don't use recursion in evaluate :( 2024-03-15 20:21:44 -04:00
Emi Simpson d94ff158f7
Make function type rendering prettier 2024-03-15 20:21:44 -04:00
Emi Simpson 97cd81dc43
Add some more stuff to the example file 2024-03-15 20:21:44 -04:00
Emi Simpson 5c869516e2
Upgrade the REPL UI 2024-03-15 20:21:44 -04:00
Emi Simpson d5649b0523
Return actually analagus types in BranchMismatch 2024-03-15 20:21:43 -04:00
Emi Simpson ca685d7ded
Fix substitution not working for polytypes
honestly i don't know how i didn't catch that sooner
2024-03-15 20:21:43 -04:00
Emi Simpson fb55346003
Make typechecking slightly less buggy
- The statement ["x", "x"] no longer typechecks in the empty context
- The statement ["ident": {"x": "x"}] now correctly generalizes
- The statement ["compose", "compose", "compose"] no longer goes into an infinite loop
2024-03-15 20:21:43 -04:00
Emi Simpson 792674797d
Buggy typechecking 2024-03-15 20:21:43 -04:00
Emi Simpson 907bc5d505
Add an example json 2024-03-15 20:21:43 -04:00
Emi Simpson 224ec0bc98
Add a repl 2024-03-15 20:21:42 -04:00
Emi Simpson 0383bc5b82
Take out the old recursion thingy 2024-03-15 20:21:42 -04:00
Emi Simpson a49b7b5baf
Add let statements 2024-03-15 20:21:42 -04:00
Emi Simpson c27852daba
Add in IR generation 2024-03-15 20:21:42 -04:00