Commit Graph

8 Commits (master)

Author SHA1 Message Date
James T. Martin a543981b67
Combine expression representations using the 'trees that grow' design pattern.
Trees that grow introduces a lot of boilerplate but is bound to be essentially necessary
when I add in the type checker and all sorts of builtin data types.
(I know this because I already *implemented* those things;
it's mostly a matter of trying to merge it all into this codebase).

Accomplishing this also involved restructuring the project
and rewriting a few algorithms in the process,
but those changes are fundamentally intwined with this one.
2021-03-16 18:25:42 -07:00
James T. Martin 4541f30f46
Lots of refactors using recursion-schemes, plus hacky code cleanup.
A side-effect of this refactoring was that I got `traceEval` for free!
2021-03-15 23:56:52 -07:00
James T. Martin 25658f370a
Complexity was getting out of hand. Beginning a rewrite. Added tests. 2019-12-11 18:29:28 -08:00
James T. Martin 7cb27e8e9a Modified to use dependent types and 'Drop' instead of a var index. 2019-08-23 18:38:57 -07:00
James T. Martin 2e95783c3a Simplified the code, at the cost of removing type-level invariants. 2019-08-17 11:49:14 -07:00
James T. Martin 9cda0ef9c2 Cleaned up the code, removed dep on recursion-schemes. 2019-08-17 00:01:23 -07:00
James T. Martin 43e4a77cdc Parse directly to Expr without any intermediate Ast type. 2019-08-16 22:34:09 -07:00
James T. Martin d74f17007a Made variables indexed by `Fin n` instead of Int. 2019-08-16 18:37:55 -07:00