Skip to content

Updated metaprogramming capabilities#779

Draft
david-broman wants to merge 22 commits into
miking-lang:developfrom
david-broman:meta
Draft

Updated metaprogramming capabilities#779
david-broman wants to merge 22 commits into
miking-lang:developfrom
david-broman:meta

Conversation

@david-broman
Copy link
Copy Markdown
Contributor

To be added.

david-broman and others added 22 commits July 26, 2023 15:40
* Update s.t. include is more general

* Extract specialize arg dependencies

* Add utils to get names of required nodes

* Include necessary funcs/cons. in AST

* Initial lifting of constructors

* Initial compilation of specialize terms

* Add more TyCon

* Add test where extract fails

* Info as dep

* Add check if any specialize terms found

* Add specialize pass in compilation

* Lift names to nosym for now

* Add peval def. with env as arg

* Rm unnecessary def

* Add ident (symbol) handling

* Remove unnecessary pat match

* Add float/bool/char to liftviatype

* Rm whitespace

* Change to using dummy names when testing lift

* Remove comments

* Binding to Var if type not liftable in liftviatype

* Add lifting of all patterns

* Add lift for tmtype and data ast exps

* Add lift of never term

* Add some documentation comments

* Properly traverse expr

* Remove type annot call

* Use pevalExpr instead

* Rm unnec. println

* Fix indentation

* Remove dependency

* Refactor slightly

* Rename

* Rename variables

* Remove out commented code and fix include

* Refactor out the loading of run-time deps from utest-generate
* Refactor str joining to work on generic sequences instead. Also
add a subsequence replacement method as well.

* Fix comment on subseqReplace
* Start work on JSON serializer generator

* Work on serializer generator

* Add basic test functionality

* Work on JSON serializer genrators

* Add support for serializing basic types

* Rename jsonLib to lib

* New approach

* Add support for record types

* Partial support for TyCons

* Start sketch on variant type serializers

* First complete version

* Fix deserializer bug

* Remove leftover TypeEq stub

* Add addJsonSerializers

* Add a few more handles on JSON library names

* Add missing Some
* Fix partial match bug in subseqReplace

* One more test for good measure, with 2 partially matched characters
that has to be backtracked on

* Just one more test case clearly showing that the replacement is
non-iterative, it does not try to replace a replacement.
* Simplify multiplication of two negative factors

* Add CPS style maps and folds

* Partial evaluation of seq ops

* Make dynamic computions the default case

* One-pass folding of let bindings

* Handle closures and recursion smarter

* Factor out incomplete rec let and lam implementations
* Fix bugs in JSON serializers

* Add missing Eval inclusion

* Fix type bug
* Add skeleton of monomorphization including tests

* Add parts of monomorphization with tests

* Add basic monomorphisation support

* Update monomorphization

* Replace order sensitive test

* Handle monomorphization with mutual recursion

* Minor fixes to monomorphization

* Minor fixes and improvements

* Add notes about higher-order polymorphism

* Remove monomorphization in main compiler

* Fix bug in test code

* Fix minor bugs in the monomorphization

* Extend todo note of problems with frozen types

* Improve monomorphization documentation

* Remove constEnv as it is unused

* Clarify limitations and handle errors better
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants