All Projects → unisonweb → elm-browser

unisonweb / elm-browser

Licence: MIT license
A Unison Github repo explorer in Elm

Programming Languages

elm
856 projects
haskell
3896 projects

Projects that are alternatives of or similar to elm-browser

Unison
A friendly programming language from the future
Stars: ✭ 4,192 (+12603.03%)
Mutual labels:  unison, unison-language
autorsync
Node.js File Watch + rsync
Stars: ✭ 56 (+69.7%)
Mutual labels:  unison
unicloud
Unison file sync web interface
Stars: ✭ 40 (+21.21%)
Mutual labels:  unison
unison-json
An implementation of JSON decoders and encoders inspired by elm/json
Stars: ✭ 18 (-45.45%)
Mutual labels:  unison-language

Archived

See the Codebase UI for a similar and active project: https://github.com/unisonweb/codebase-ui

Unison Codebase Explorer

The Unison Codebase Explorer is an Elm application and companion Haskell server for exploring your Unison codebase. It is very alpha-quality software, but you can still use it in anger. Pull requests welcome and appreciated :)

Building

To build, you need elm 0.19+ and either cabal-install 2.4+ or stack.

  • Generate the main.js JavaScript blob.

    elm make client-src/Main.elm --output main.js
    
  • If you are using cabal, make sure you've configured it to install executables somewhere on your $PATH. Open ~/.cabal/config and uncomment the symlink-bindir line to be something like:

    symlink-bindir = /home/mitchell/.local/bin
    
  • Build and install the Haskell server, which bundles the index.html to make it available by the server at runtime.

    // One or the other
    cabal v2-install . --overwrite-policy=always
    stack install
    

That's it! Now you have a unison-browser executable that you can run in any directory with a .unison folder.

Note: Development Workflow

Client

For a slightly optimized workflow, you can have live reloading with elm-live

  • Start the haskell server

    // One or the other
    cabal v2-run
    stack run
    
  • Use elm-live

    elm-live client-src/Main.elm -- --output=main.js
    # or, equivalently
    make watch
    

The --debug for elm-live/elm-make is possible with tiny Unison codebases, but it becomes untenable by the time you have around 1000 definitions.

Server

Use ghcid for live reloading.

// One or the other
ghcid -c "cabal v2-repl -O0" --restart unison-browser.cabal
ghcid -c "stack ghci" --restart unison-browser.cabal

Remember that ucm saves your .unison codebase in your home directory by default, so you'll probably want to start the server in there.

Code guide

Module guide:

  • GitHub

    GitHub API.

  • Misc

    Random junk! Find a home for me pls!

  • Ucb.Main.*

    Main stuff, model-view-update loop.

  • Ucb.Unison.*

    Unison-specific app stuff (needs better organization).

  • Ucb.Util.*

    Miscellaneous stuff missing from the core Elm ecosystem.

  • Unison.*

    Core Unison language kit, suitable as a standalone library. Contains types and pure functions that roughly match the Haskell source.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].