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

Add a type-checking command line flag #566

Merged
merged 5 commits into from
Apr 4, 2023
Merged

Add a type-checking command line flag #566

merged 5 commits into from
Apr 4, 2023

Conversation

hugomg
Copy link
Member

@hugomg hugomg commented Mar 19, 2023

Previously we used --stop-after, but we removed that... A flag to stop the compiler after the type-checking step might be useful for text editor and linter support.

@hugomg
Copy link
Member Author

hugomg commented Mar 19, 2023

ps.: I still need to add tests before this can be merged.

@bjornbm
Copy link
Contributor

bjornbm commented Mar 19, 2023

In reply to #277 (comment)

I don't think this adds much for the purposes of #277 (comment). It is nice perhaps to not generate the .lua files, but they aren't/weren't causing much trouble either. For sure this is cleaner if one does not intend to run additional Lua tools over them.

@bjornbm
Copy link
Contributor

bjornbm commented Mar 22, 2023

Actually, it does add significant value if the checking is more rigorous than that of --emit-lua, but I would think that --emit-lua should do full checking (it currently does not as noted in #567 (comment)).

bjornbm and others added 5 commits March 23, 2023 16:06
Marking the Pallene code blocks as lua code provides better-than-nothing syntax highlighting on Github (and other tools). Obviously Pallene specifics (typealias, record, types…) do not get highlighted as keywords.
Mark Pallene code blocks as lua for highlighting
In manual, sum_list function has an extra do. If I’m not mistaken, this is an error in the documentation, because this example isn’t grammatically correct and doesn’t compile.

This tweak fixes that
Manual: sum_list example: remove unnecessary “do”
Previously we used --stop-after, but we removed that...
A flag to stop the compiler after the type-checking step might be
useful for text editor and linter support.
@hugomg hugomg merged commit 4b333a8 into master Apr 4, 2023
@hugomg hugomg deleted the only-check branch April 4, 2023 02:23
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.

3 participants