-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
feat(language): Add support for Haskell via tree-sitter-haskell
#1128
Conversation
WalkthroughThe recent updates to the language crates introduce Haskell language support using Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
tree-sitter-haskell
tree-sitter-haskell
Hi @fwcd, thanks for your interest in ast-grep. You can look at custom language support https://ast-grep.github.io/advanced/custom-language.html for supporting haskell. It is probable you need to configure the |
Neat, didn't know about that and now it seems to work, thanks! I have added some tests too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
,!**/*.lock
Files selected for processing (4)
- crates/language/Cargo.toml (3 hunks)
- crates/language/src/haskell.rs (1 hunks)
- crates/language/src/lib.rs (7 hunks)
- crates/language/src/parsers.rs (2 hunks)
Files skipped from review due to trivial changes (1)
- crates/language/Cargo.toml
Additional comments not posted (12)
crates/language/src/haskell.rs (5)
6-9
: LGTM! The function correctly delegates totest_match_lang
with Haskell as the language parameter.
11-14
: LGTM! The function correctly delegates totest_non_match_lang
with Haskell as the language parameter.
16-26
: LGTM! The function tests various Haskell syntax elements. Consider adding more comprehensive tests if needed to cover more complex Haskell syntax.
28-31
: LGTM! The function correctly delegates totest_replace_lang
with Haskell as the language parameter.
33-68
: LGTM! The function tests replacement in Haskell code. Consider adding more comprehensive tests if needed to cover more complex Haskell syntax.crates/language/src/parsers.rs (1)
35-37
: LGTM! The function correctly returns the Tree-sitter language configuration for Haskell.crates/language/src/lib.rs (6)
16-16
: LGTM! The Haskell module has been correctly added.
160-160
: LGTM! Haskell has been correctly added to theSupportLang
enum.
181-181
: LGTM! Haskell has been correctly added to theall_langs
function.
234-234
: LGTM! Haskell aliases have been correctly added.
279-279
: LGTM! Haskell has been correctly added to theexecute_lang_method
macro.
335-335
: LGTM! Haskell file extensions have been correctly added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- crates/language/src/lib.rs (7 hunks)
Files skipped from review as they are similar to previous changes (1)
- crates/language/src/lib.rs
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1128 +/- ##
==========================================
+ Coverage 73.36% 73.50% +0.13%
==========================================
Files 76 76
Lines 5219 5219
==========================================
+ Hits 3829 3836 +7
+ Misses 1390 1383 -7 ☔ View full report in Codecov by Sentry. |
thanks |
Fixes #1127
This adds support for Haskell by integrating
tree-sitter-haskell
. While it compiles, even rudimentary patterns such asreturn $A
or$A $B
do not work yet (probably an upstream issue?), therefore I will mark this PR as a draft for now.