Skip to content

Clean up int literal hint#2313

Merged
Armael merged 3 commits intoocaml:trunkfrom
Julow:hint_handling
Apr 11, 2019
Merged

Clean up int literal hint#2313
Armael merged 3 commits intoocaml:trunkfrom
Julow:hint_handling

Conversation

@Julow
Copy link
Copy Markdown
Contributor

@Julow Julow commented Mar 12, 2019

As @gasche pointed out on my previous PR, my two previous PR need a small cleanup.

I changed Location.report to allow sub messages without location and print the int literal hint as a sub message.

@Armael
Copy link
Copy Markdown
Member

Armael commented Mar 12, 2019

You don't need to change Location.report to have sub-messages without a (displayed) location: you can do that by setting the sub-message location to Location.none.

@Julow
Copy link
Copy Markdown
Contributor Author

Julow commented Mar 12, 2019

@Armael I reverted and use Location.none. This added 2 spaces at the beginning of the line, what do you think of my last commit ?

@Julow
Copy link
Copy Markdown
Contributor Author

Julow commented Mar 13, 2019

@Armael I finally reverted all my changes to location.ml.

Copy link
Copy Markdown
Member

@Armael Armael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay on reviewing this. The patch looks good, I agree it's an improvement.
I left a couple comments, but I'm ready to merge after they are addressed.

@Julow
Copy link
Copy Markdown
Contributor Author

Julow commented Apr 10, 2019

Thanks for the review !

#2319 may not be merged because my PRs are adding code that should not be in the type checker. Do you think moving error-reporting code to another module is feasible or is a good solution ?

@Armael
Copy link
Copy Markdown
Member

Armael commented Apr 10, 2019

Let's not mix this PR and #2319 . And note that in the current situation, creating new modules in the compiler is a bit delicate, since they pollute the global namespace for anyone linking against compiler-libs...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants