Closed Bodigrim closed 2 years ago
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.
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 prettyprinter
API.
Nevertheless, I'm curious what @newhoggy thinks about this PR.
@sjakobi if you are fine with #208, then it's indeed a more flexible and powerful way forward.
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 performT.pack
/T.unpack
when on GHC 7.10+ (which covers the vast majority of users) and resort to slowread . show
(https://github.com/quchen/prettyprinter/issues/207#issuecomment-928422424) only on older systems.