Skip to content

live webview of pretty-simple in action #50

@cdepillabout

Description

@cdepillabout

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:

  1. Figure how to compile pretty-simple with GHCJS.
  2. 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.
  3. 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?
  4. Send a PR with the above.
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions