• Stars
    star
    142
  • Rank 258,495 (Top 6 %)
  • Language
    Haskell
  • License
    MIT License
  • Created almost 4 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Show Haskell type annotations when doing code review on Github

example workflow file path

izuna

Enhances Haskell code review for Github

Izuna brings a richer GitHub interface by showing type annotations directly in your browser.

gif unified demo 1 gif split demo 2

Requirements

As of today, the izuna plugin is only available for Chrome and your Haskell project needs to be using either GHC 8.10.1 or GHC 8.10.2

How do I use it?

Go to the chrome webstore and install the izuna chrome extension. Then you can either go to one of the izuna-example pull requests or submit one to see izuna in action.

To use it for your own project, you'll also need to enable the github action izuna-action.

For development purpose, you need to install the izuna plugin in chrome by going to chrome://extensions/ and clicking load unpacked (then select the chrome-extension folder).

How does it work?

Izuna makes use of .hi extended (AKA hie files) to recover information about your code. Your project information is then displayed by a plugin in your browser.

A more detailed worklow is:

  1. Every time you push a commit, a GitHub Action will upload the hie files to a server
  2. The server will then process the hie files
  3. When you visit a pull request from your browser, information about this PR (if any available) will be fetched from the server and displayed in your browser thanks to a plugin.

Features & Roadmap

βœ…: available
πŸ”§: building

available feature description
βœ… Type annotation Show type annotation for your haskell code
βœ… Split/Unified diff view mode Works correctly for unified and split diff view mode
βœ… Chrome support
βœ… Security Source code is no longer stored
βœ… Syntax color Display richer Haskell syntax color
πŸ”§ GHC 8.10.3 support only GHC 8.10.1 and GHC 8.10.2 are available atm

How to build

Github Action

Please go to the izuna-action repo for more information.

izuna-builder/izuna-server

izuna-builder is the core of the project. Its purpose is to receive a hie files tar archive from the github action and extract it. Then it needs to parse the hie files and recover any useful information.

Build with:

stack build izuna-builder --stack-yaml=stack-8.10.1.yaml --no-nix

izuna-server is a simple server that returns the processed hie files for the plugin.

Build with:

stack build izuna-server --stack-yaml=stack-8.10.1.yaml --no-nix

Inspirations

Izuna was (more than) inspired by:

Many thanks to Weeder by Ocharles and Stan by Kowainik which helped me understand better how Hie files work.

Icons made by Freepik