-
Notifications
You must be signed in to change notification settings - Fork 16
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
Make type checker save type information #376
Conversation
919c477
to
f20380d
Compare
f478d0a
to
0294c6b
Compare
Tools does not have to run the type checker again.
Moving to writing the type checking output in a file, we will ask dune to run the gospel type checker. Printing `OK` on stdout add unnecessary noise here.
72856db
to
baa93be
Compare
Unfortunately, this requires generating dummy empty `.gospel` files for failing tests
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.
This is a simple and nice change, well done!
I’ve pushed in my drop-ok
branch two extra commits to complete the change of dropping OK
s and to make dune
aware of the .gospel
files that will be generated for succeeding tests. In turn, this makes an extra test that type checking succeeded on documentation :-)
I have one suggestion: it would be nice to teach gospel check
how to process .gospel
files, among other things as a way to test the read_gospel_file
and that the marshalling did work as expected. It would also serve as a simple way to inspect the content of a .gospel
file.
Simplify error message along the way as there are now too many different cases to have a detailed yet concise message.
Thank you @shym for your comment :-) |
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.
This is nice, thank you!
(I only reviewed the diff with my drop-ok
branch, not commit by commit)
A tiny suggestion: with GNU’s wc
, wc -l < bar
is just the line count, so you don’t need an extra cut).
I’m not sure about portability (but that’s already the case with the cut
, I might argue :-).
0303b9e
to
316f677
Compare
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 believe this pull request is ready to be merged.
Thanks. |
This PR proposes to marshall the product of the type checker and save it in a file with the
.gospel
file extension so that external tool does not have to run the type checker by themselves.