Skip to content

Add PrettyAnn type class - #256

Merged
sjakobi merged 5 commits into
haskell-prettyprinter:masterfrom
mmhat:222-pretty-ann
Feb 24, 2026
Merged

sjakobi merged 5 commits into
haskell-prettyprinter:masterfrom
mmhat:222-pretty-ann

Conversation

@mmhat

@mmhat mmhat commented Nov 4, 2024

Copy link
Copy Markdown
Contributor

This PR adds a PrettyAnn type class that supports embedding annotations in the Doc.

Fixes #222

@mmhat
mmhat force-pushed the 222-pretty-ann branch 2 times, most recently from bc72da4 to 117c8fb Compare November 4, 2024 08:19
@mmhat
mmhat marked this pull request as ready for review November 4, 2024 08:19
Comment thread prettyprinter/src/Prettyprinter/Internal.hs Outdated
Comment thread prettyprinter/src/Prettyprinter/Internal.hs Outdated
Comment thread prettyprinter/src/Prettyprinter/Internal.hs Outdated
Comment thread prettyprinter/src/Prettyprinter/Internal.hs Outdated
Comment thread prettyprinter/src/Prettyprinter/Internal.hs

@BinderDavid BinderDavid left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good. I checked that all old instances of Pretty are also available for PrettyAnn.

Comment thread prettyprinter/src/Prettyprinter/Internal.hs
@ony

ony commented Dec 3, 2025 •

Copy link
Copy Markdown

Thank you for getting this moving! Looks good to me.

@sjakobi

sjakobi commented Dec 16, 2025

Copy link
Copy Markdown
Collaborator

FYI, I hope to get a few new co-maintainers involved in this project (see #272). This PR will be merged if the new maintainers approve it.

(And of course: If you're interested in becoming a co-maintainer, please let me know! :-) )

@a-02 a-02 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Given that this has been approved by so many people prior to me already, I think this is good to go. When we release we'll mark all the FIXME's with 1.7.1.

I'll let @Ei30metry be the final say, since this is the first PR we're overseeing as co-maintainers.

@Ei30metry

Copy link
Copy Markdown
Collaborator

Given that this has been approved by so many people prior to me already, I think this is good to go. When we release we'll mark all the FIXME's with 1.7.1.

I'll let @Ei30metry be the final say, since this is the first PR we're overseeing as co-maintainers.

Thanks @a-02, here are my thoughts:

  1. The Pretty class has many examples, we should probably add some haddock comments if possible. Even mentioning some of the example annotations would go a long way.
  2. The other one is Pretty instances for 4-tuple, 5-tuple, and 6-tuple #274

Everything else looks great. Thanks for the contribution @mmhat!

@sjakobi sjakobi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, everyone!

@sjakobi
sjakobi merged commit d81e657 into haskell-prettyprinter:master Feb 24, 2026
16 checks passed
@mmhat
mmhat deleted the 222-pretty-ann branch February 25, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Add PrettyAnn typeclass

7 participants