It would be nice to have a website that could be used interactively to show how pretty-simple formats things.
This could be done in the following steps:
- Figure how to compile
pretty-simple with GHCJS.
- Create a small frontend application in either Haskell with GHCJS or just plain JavaScript. The frontend application should roughly look like this: https://jsoneditoronline.org/. It should have a textbox on the left for entering some sort of
showed Haskell datatype. It should have another Haskell datatype on the right that shows the input Haskell datatype formatted with pretty-simple.
- The frontend application needs a way to convert from ansi escape sequences output from pretty-simple to HTML for showing in a web page. Maybe there is already a Haskell library (or JavaScript library) that does this?
- Send a PR with the above.
- Together we can figure out how to use github-pages to host this example page.
I think there is another pretty-printing library for Haskell that does something like the above, but I forget what the library is called. It might be a good idea to look at how they are doing it.
It would be nice to have a website that could be used interactively to show how pretty-simple formats things.
This could be done in the following steps:
pretty-simplewith GHCJS.showed Haskell datatype. It should have another Haskell datatype on the right that shows the input Haskell datatype formatted with pretty-simple.I think there is another pretty-printing library for Haskell that does something like the above, but I forget what the library is called. It might be a good idea to look at how they are doing it.