-
Notifications
You must be signed in to change notification settings - Fork 35
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
Updates to type annotation/assertion after discussion/review #167
Conversation
Codecov Report
@@ Coverage Diff @@
## master #167 +/- ##
==========================================
+ Coverage 83.01% 83.17% +0.15%
==========================================
Files 9 9
Lines 2126 2134 +8
==========================================
+ Hits 1765 1775 +10
+ Misses 361 359 -2
Continue to review full report at Codecov.
|
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.
Great stuff!
I apologize if you think I was a little trigger happy with merging your previous PR.
%% adjusts type checking accordingly. The macros are supplied only for | ||
%% convenience. | ||
%% | ||
-compile({inline, ['::'/2, ':::'/2]}). |
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.
It's really helpful that you've written this documentation. I think it would be even more helpful if you further clarified the distinction between ::
and :::
. Right now it's not clear which one does annotation and which does assertion.
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.
Oh, that's true.
io:format("The type annotation ~p on line ~p is not a valid type~n", | ||
[TypeStr, erl_anno:line(P)]); | ||
[erl_pp:expr(TypeLit), line_no(TypeLit)]); |
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.
you could add maybe_format_column
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.
Maybe. I thought it can be done when column is added to all error messages in a uniform way. One function call format_location
would be preferable.
No problem. The merged part can be used already. I'm happy you like it. :-) |
21e1e79
to
e76cc59
Compare
e76cc59
to
2a4d3ce
Compare
#166 got merged so here are the discussed updates in a separate PR