-
Notifications
You must be signed in to change notification settings - Fork 58
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
Fix #2924. Use MegaParsec scanner for Markdown files #2925
Conversation
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.
I suggest adding a comment to clarify
5a608a0
to
7863d4b
Compare
@janmasrovira Could you please make Ormolu happy here. |
Done! If you want you can install the same ormolu version that we use in CI with |
…e.hs Co-authored-by: Jan Mas Rovira <[email protected]>
644d068
to
ca5f9a6
Compare
I tried:
It's probably due to my mac. |
- In #2925, the flatparse scanner always fails for .md files and silently falls back to megaparsec. - In #2929, a warning is introduced that informs the user when the fallback parser is being used. This is causing a warning every time we scan a markdown file. - This pr fixes the problem by changing the default strategy to directly use megaparsec when a .md file is given.
This PR addresses a bug/missing case present since v0.6.2, introduced specifically by
That PR involves detecting imports in Juvix files before type checking, and that's the issue.
Detecting/scanning imports is done by running a flat parser (which ignores the Juvix Markdown structure) and when it fails, it runs a Megaparser parse. So, for simplicity,
we could just continue using the same Megaparser as before for Juvix Markdown files.