Skip to content

Add pattern SString#214

Closed
Bodigrim wants to merge 3 commits into
haskell-prettyprinter:masterfrom
Bodigrim:master
Closed

Add pattern SString#214
Bodigrim wants to merge 3 commits into
haskell-prettyprinter:masterfrom
Bodigrim:master

Conversation

@Bodigrim

@Bodigrim Bodigrim commented Nov 3, 2021

Copy link
Copy Markdown
Contributor

I wonder if this could provide a lightweight resolution to #207, alternative to #208. @newhoggy what do you think?

The idea is to use SString to perform T.pack / T.unpack when on GHC 7.10+ (which covers the vast majority of users) and resort to slow read . show (#207 (comment)) only on older systems.

@Bodigrim

Bodigrim commented Nov 3, 2021

Copy link
Copy Markdown
Contributor Author

Actually, the latest incarnation of #208 is pretty lightweight, and this patch is obnoviously CPP-heavy, so dunno if I can claim any improvement ;) Feel free to close, this is just a raw experiment.

@sjakobi

sjakobi commented Nov 3, 2021

Copy link
Copy Markdown
Collaborator

I don't have any personal experience with using -f-text, but it seems to me that the API enhancements in #208 are more powerful since they also provide ways for using the lazy-Text and Builder based parts of the prettyprinterAPI.

Nevertheless, I'm curious what @newhoggy thinks about this PR.

@Bodigrim

Bodigrim commented Nov 3, 2021

Copy link
Copy Markdown
Contributor Author

@sjakobi if you are fine with #208, then it's indeed a more flexible and powerful way forward.

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.

2 participants