Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Indexed functor" AST (recursion schemes) #18

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

sophicshift
Copy link
Owner

@sophicshift sophicshift commented Dec 21, 2023

After a few months experimenting I'm quite convinced the best way to do AST annotations and manipulation in Haskell is using ideas from recursion schemes. It allows having multiple variants of the AST (a 'bare' one using lists, one for the parser with position annotations and fast concat via Data.Seq, another with custom metadata for exporting...) and once you have the instances, transforming between them is easier. Conceptually it is also simple and elegant.

Closes #17

@sophicshift sophicshift changed the title Indexed AST (recursion schemes) "Indexed functor" AST (recursion schemes) Dec 21, 2023
@sophicshift sophicshift marked this pull request as ready for review February 5, 2024 00:26
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.

Standard properties annotations
1 participant