Closed jwaldmann closed 7 years ago
You are calling "show" and then parse the output, looking for parentheses, brackets, braces; then use this for indentation and colouring?
This is exactly what's happening. So I believe it would work with JSON.
Do you have any suggestion about where this information should be placed? Do you think it goes better somewhere like the README? Or maybe in the haddock documentation? Or both?
I suggest to mention this on the project's github and hackage front pages, so potential users see it early.
I ended up adding it to the to the README:
https://github.com/cdepillabout/pretty-simple#other-uses
I also added a small note on the pString
function.
Thanks for the suggestion!
Hi. Interesting project. Can you explain (in the docs) how this works? You are calling "show" and then parse the output, looking for parentheses, brackets, braces; then use this for indentation and colouring?
So, I can use this for (data types with Show instances that procude) strings that have matching pairs of these kind of parens? (So, it would work for textual renderings of JSON? Not that I'd want to do this - it's just for clarification.)