Closed srghma closed 4 years ago
@paluh @flip111 @jvliwanag the work is finished
you can check the tests to see the changes
this lib can automatically determine if expression needs to be printed in one-line (aka. flattened) or in multiline
first, you write your code in a multiline fashion (vcat
func for example), in respective places you use FlatAlt multilineDoc flattenedDoc
constructor (e.g. vcat
is using it internally)
then you wrap your inputDoc
in group
function so it flattens your inputDoc
and constructs Union newFlattenedDoc inputDocNotChanged
do you mind if I create a fork of https://github.com/jmackie/purescript-prettyprinter with my changes in this organization,
since orignal author doesn't want to be involved https://github.com/jmackie/purescript-prettyprinter/issues/2 ?
actually I would even rename it to prettyprinter-renderable (because the implementation is different from haskell's version)
and publish ps-cst and prettyprinter-renderable (question is here https://github.com/jmackie/purescript-prettyprinter/issues/2#issuecomment-668634491 )
do you mind if I create a fork of https://github.com/jmackie/purescript-prettyprinter with my changes in this organization,
Please go ahead with this. I can't do any more review at the moment since i'm very busy in personal life. Maybe in the fall or winter i and others can be more involved again. Thanks again for the great work !
Thx, will create repo later
Replaced boxes lib with this https://github.com/jmackie/purescript-prettyprinter/pull/3