-
Notifications
You must be signed in to change notification settings - Fork 790
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
Clean up illib #4428
Clean up illib #4428
Conversation
8a00ce1
to
e26f462
Compare
done with this one |
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.
Looks good to me; the whole tryDropPrefix
stuff that didn't really do anything with the fact that it's optional seems like a good thing to clean up
src/fsharp/NicePrint.fs
Outdated
@@ -1275,7 +1277,7 @@ module InfoMemberPrinting = | |||
let paramDatas = minfo.GetParamDatas(amap, m, minst) | |||
let layout = | |||
layout ^^ | |||
if isNil (List.concat paramDatas) then | |||
if Seq.isEmpty (Seq.concat paramDatas) then |
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.
Please don't introduce Seq in the compiler unless there is a specific perf measurement, for much the same reasons as mentioned in other PR. I know there is an intermediate allocation, but ...
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.
In this case it's not because of the intermediate allocation, but because it may will exit on very first item in paramDatas instead of concat and then throwing it away. But I can rewrite that as List.exists (not isNil) paramDatas
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.
In this case it's not because of the intermediate allocation, but because it may will exit on very first item in paramDatas instead of concat and then throwing it away. But I can rewrite that as List.exists (not isNil) paramDatas
Approved apart from the one thing i mentioned with Seq creeping in |
Fixing a single line from mobile phone. How hard can it be? |
Ok looks good now and much better than Seq. |
No description provided.