-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Unify showSDocUnsafe #2830
Conversation
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! |
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:
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 -> Text
finally.Extends #2828, this pr wrapped
showSDocUnsafe
and unified allSDoc
printing functions into the following four functionsshowGhc
hasdefaultUserStyle
andsuppressUnique
, we'd use this as much as we can to print ghc internal.showGhcWithUniques
is the alias ofshowSDocUnsafe
, it may have different behavior under different ghc versions, like complex type variables in hover with GHC 9.2 #2716.prettyPrint
sames asshowGhc
but returnString
instead ofText
.prettyPrintWithUnique
, theString
version ofshowGhcWithUniques
.