Make text an optional dependency#202
Make text an optional dependency#202sjakobi merged 4 commits intohaskell-prettyprinter:masterfrom Bodigrim:master
Conversation
There was a problem hiding this comment.
Nice hack! 😈 I'm curious what @quchen will say! ;)
I'd like to see:
- Brief explanatory module headers for the contents of
src-text. - CI with
-text. I think this can be achieved with ahaskell-ciconstraint set.
|
Also, I hope that there are no expectations that |
|
I'm happy to supply CI config and additional comments and whatever :) if @quchen approves this approach. There is also an option to separate |
|
Wow, this is some hack. If it helps adoption, I’m in favor. I think you should add documentation for the very much non-intuitive new modules, a simple paste of the ticket’s description as Haddock should suffice. It’s also important that this does not show up the official Haddock documentation or in standard builds, but that shouldn’t be the case by default anyway, right? |
sjakobi
left a comment
There was a problem hiding this comment.
Looks pretty good! A few more wibbles…
|
The previous CI run had timed out for some reason. I've restarted it now. |
This reverts commit f69d53a.
|
@sjakobi There appears to be a subtle issue with Stack support of internal libraries: while Otherwise this is ready for a final review, I believe. |
|
Thank you, @Bodigrim! :) I'll try to start working on a release this week. |
I should have raised an issue first, but it is easier to demonstate what I'm proposing with a PR. I'm fine to have it closed/rejected, if we find it unpalatable.
I very much understand that it's a core value of
prettyprinterto useTextand notString. However, there are cases when you cannot afford it: namely, when you are atext(orbytestring) developer ;) or work with a very bleeding-edge GHC. If in futureansi-wl-pprint(already deprecated) is to extinct and be replaced byprettyprinterin dependencies ofoptparse-applicative,tastyandtest-framework, developers of low-level packages would have to deal with pretty nasty build dependencies. E. g., to runbytestringtests you'd have to rebuildtext, thenprettyprinter, thenoptparse-applicative, thentastyand all its providers. This is extremely disheartening, as I can tell from earlier experience.I was interested to check how difficult is to make
prettyprinterfallback toString, iftextis not available. It seems that just couple of lines and a Cabal flag would suffice. How do you feel about this?