Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
/ webshow Public archive

Show programming language printed values in a web UI

License

Notifications You must be signed in to change notification settings

chrisdone-archive/webshow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webshow

Run webshow of a directory and get pretty browsing of the data structure.

Usage

Supports only Haskell Show values at the moment.

Usage: webshow [--version] [--help] [-p|--port ARG] [-d|--directory ARG]
  Show printed output from languages

Available options:
  --version                Show version
  --help                   Show this help text
  -p,--port ARG            Port number to listen on
  -d,--directory ARG       Directory to look at

E.g.

$ webshow -d /my/path -p 1234

Put a file like [1,2,3] in x.hs in the /my/path directory and then browse to it.

In my case I've made a dir /webshow and then when I want to view something I do

writeFile "/webshow/thing.hs" (show thing)

And then go to http://localhost:1234/thing.hs.

Example

You click the constructor names or parentheses or list brackets to expand/collapse them interactively, like web browser's consoles that view JS objects.

Video

High-res screenshot:

How it works

It uses Haskell's pretty-show to parse your Haskell Show output. So use types that have reasonable output. If you wrote a custom Show instance, it'll just show the text as plain text.

About

Show programming language printed values in a web UI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published