-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Bat Panics on Haskell Source Code #314
Comments
Thank you very much for the detailed bug report! I'm not 100% sure, but it looks like this is a bug in syntect. I'm still investigating. |
I'm having the exact same problem with OCaml code, in case that makes a difference. Here's the stack trace:
The offending line is: match (try Some (input_line i) with End_of_file -> None) with Hope that helps. |
Apparently there was some weird bug in the binary syntax set that I created for the 0.7.0 release. Commit 238482e should fix this. |
Fixed in v0.7.1 |
The problem persists on my end.
|
@erkin Thank you. Interestingly, this does seem to be caused by something else and is actually a bug in syntect: trishume/syntect#176 (comment) Edit: Actually, I didn't completely understand why the error is fixed for Haskell files. It might be that some versions of the Haskell language definition also trigger the same error. |
Fixed in v0.8.0. |
Both Bat 0.7.0 and 20b02e7 (latest checkout of master) panic on very basic Haskell source code. Since it doesn't panic when piping the output, or upon further inspection, when I remove any type declarations (which look like
main :: IO ()
), it seems that the issue may lie in the syntax highlighter.I've also confirmed that Bat works perfectly fine with a bunch of other regular files I have lying around, just to be sure.
Here's the error/output with
RUST_BACKTRACE=1
on 20b02e7:And here is the most minimal Haskell source code Bat panics on:
The text was updated successfully, but these errors were encountered: