Add PrettyPrinter That Returns Both Errors & Text #351

Open
prikhi wants to merge 1 commits from prikhi/add-alternative-coreio into master

1 Commits (master)

Author SHA1 Message Date
Pavan Rikhi fcd38d8ad4 Add PrettyPrinter That Returns Both Errors & Text
Add a new `pPrintText` function to the Brittany.Main module that behaves
similarly to the `coreIO` function, but instead only take a config &
input string & always returns a list of errors & either the unaltered or
the pretty printed text.

This new function will always check the generated text & ignores all
tracing and printing to stdout.

This a useful function for utility programs, like haskell-language-server,
that want to feed text to brittany & manipulate the output.
2021-07-09 20:06:02 -04:00