-
-
Notifications
You must be signed in to change notification settings - Fork 412
Unify showSDocUnsafe #2830
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
Unify showSDocUnsafe #2830
Conversation
michaelpj
left a 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.
Wonderful, thank you!
|
lgtm, thanks! |
Ailrun
left a 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.
Thank you for the update!
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.
Thanks, looks good to me :) Here are a few very minor comments:
eddiemundo
left a 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.
I wanna bikeshed printOutputable to prettyPrintAsText since it's the same as prettyPrint, or oppositely prettyPrint to printOutputableAsString, but since you already did a change once, it's fine...
So all good.
|
Temporarily taking out of the merge queue until the release is done. |
* Unify showSDocUnsafe * Fix dependency * Add missing instance * Add missing instance * Remove unused imports * Clean up unused code * Remove unnecessary exports & Rename * Unify use printOutputable * Remove redundant import * Replace show with unpack * Rerun tests * Rerun tests Co-authored-by: Pepe Iborra <[email protected]> Co-authored-by: Junyoung "Clare" Jang <[email protected]>
* Unify showSDocUnsafe * Fix dependency * Add missing instance * Add missing instance * Remove unused imports * Clean up unused code * Remove unnecessary exports & Rename * Unify use printOutputable * Remove redundant import * Replace show with unpack * Rerun tests * Rerun tests Co-authored-by: Pepe Iborra <[email protected]> Co-authored-by: Junyoung "Clare" Jang <[email protected]>
We choose
printOutputable :: Outputable a => a -> Textfinally.Extends #2828, this pr wrapped
showSDocUnsafeand unified allSDocprinting functions into the following four functionsshowGhchasdefaultUserStyleandsuppressUnique, we'd use this as much as we can to print ghc internal.showGhcWithUniquesis the alias ofshowSDocUnsafe, it may have different behavior under different ghc versions, like complex type variables in hover with GHC 9.2 #2716.prettyPrintsames asshowGhcbut returnStringinstead ofText.prettyPrintWithUnique, theStringversion ofshowGhcWithUniques.