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

Lexer & Parser #23

Merged
merged 11 commits into from
Oct 27, 2024
Merged

Lexer & Parser #23

merged 11 commits into from
Oct 27, 2024

Conversation

WoWaster
Copy link
Member

No description provided.

@WoWaster WoWaster self-assigned this Sep 16, 2024
@WoWaster WoWaster force-pushed the lexer-parser branch 4 times, most recently from d522802 to 6cf0081 Compare September 21, 2024 08:39
@WoWaster WoWaster marked this pull request as ready for review September 21, 2024 09:29
@WoWaster WoWaster requested review from gsvgit and KubEF September 21, 2024 09:30
@WoWaster WoWaster force-pushed the lexer-parser branch 3 times, most recently from 2ccc945 to 35eee8e Compare September 30, 2024 12:45
Copy link
Member

@gsvgit gsvgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I request more comments to clearly realize interconnections between files.

lamagraph-compiler/test/Spec.hs Outdated Show resolved Hide resolved
lamagraph-compiler/src/Lamagraph/Compiler/Extension.hs Outdated Show resolved Hide resolved
@WoWaster WoWaster requested a review from gsvgit October 26, 2024 08:57
Lexer and LexerTypes make cyclic dependency.
To solve this `.hs-boot` was required. And to minimize its content it was
created for Lexer.

IMO it would be great to move `instance MonadState AlexUserState Alex`
to LexerTypes, but that would require ton of declarations in
Lexer.hs-boot.
This commit is pretty messy, because I forgot to commit lexer changes
separately from parser ones.
This a reason why I can't squash TTG directly in lexer and parser
commits.

For more info about TTG look here: https://www.jucs.org/jucs_23_1/trees_that_grow/jucs_23_01_0042_0062_najd.pdf
It helps with type check in presence of type level programming.
Also it is included in GHC2024, so IMO it can be considered safe.
@WoWaster
Copy link
Member Author

I squashed ton of commits here. But history is still quite dirty, because silly me forgot to commit lexer changes separately from parser ones while I was doing TTG rewrite 😢

@WoWaster WoWaster merged commit 82629cb into main Oct 27, 2024
6 checks passed
@WoWaster WoWaster deleted the lexer-parser branch October 27, 2024 13:42
@WoWaster WoWaster linked an issue Nov 8, 2024 that may be closed by this pull request
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.

AST for input langauge
3 participants