Home

Awesome

About

Code explorer for the Unison language. Inspired by haskell-code-explorer.

See it live here.

Status

Heavily WIP.

In addition to lots of minor issues there are three serious enough to mention here:

Technology

sloc

unison-code-explorer is built on concur-replica.

Similar to phoenix-liveview, concur-replica let's your write web UIs without any custom JavaScript. It does this by keeping a VDOM on the server for each user and sending updates to the user's browser over a websocket.

It's important to note that this is only a good fit under a the following conditions:

  1. Instant user feedback isn't required (fine for CRUD apps, not fine for AAA games. replica has client side prediction built-in for text but nothing else.)

  2. Offline use not required

  3. Not too animation heavy (since with this strategy animation is a bandwidth hog)

  4. Your server can handle it

That sounds like a lot, but if you don't have any of those restrictions I think concur-replica is incredibly promising. You can do everything in a single language, don't have to write any JS, and have amazing concurrency primatives like green threads and STM at your fingertips. And since UI code is so annoying to test the type system really shines. Overall it's just fun.

Use

  1. stack install

  2. cd to a directory containing a .unison codebase.

  3. unison-code-explorer

  4. Visit localhost:8080 in your web browser.

Static Docs Generation

See the REAMDE in the ./static-docs-generator package.

Development

Formatting with Ormolu is a bonus (use ./bin/format to hit the whole codebase).

Module Graph

misc/module-graph.svg

UCE.Code is responsible for reading the Unison code from the filesystem and getting it into a format that's easy for the UI to consume.

UCE.UI is the only part of the code that knows about concur-replica.

UCE pulls them together.