Show Haskell type annotations when doing code review on Github
Go to file
2021-02-10 09:54:54 +01:00
.github/workflows v1.0 \o/ 2021-02-10 09:54:54 +01:00
chrome-extension ++ 2021-02-08 11:44:19 +01:00
example izuna-example using ghc8101 2020-12-10 10:30:12 +01:00
izuna-builder not supporting ghc-8.10.3 for now. ghc-lib only works for ghc-8.10.3 so reverting to bare ghc 2021-02-01 16:53:30 +01:00
izuna-server don't use projectRoot for server 2021-01-15 11:47:25 +01:00
.gitignore gitignore 2021-01-28 09:53:36 +01:00
.hlint.yaml init commit 2020-12-02 10:02:00 +01:00
ChangeLog.md init commit 2020-12-02 10:02:00 +01:00
LICENSE mit license 2020-12-02 10:07:54 +01:00
Makefile fix ghcid reloading bug 2021-01-06 16:06:23 +01:00
nixpkgs.nix ghc-8.10.3 2021-01-27 11:29:19 +01:00
README.md v1.0 \o/ 2021-02-10 09:54:54 +01:00
server.dhall.dist izuna-server can now return target commit oid and pr commit oids 2020-12-14 16:35:01 +01:00
split.gif readme 2021-02-01 17:37:14 +01:00
stack-8.10.1.yaml Override nixpkgs for stack 2020-12-13 18:33:51 +01:00
stack-8.10.1.yaml.lock adding servant dep for server 8.10.1 2020-12-07 19:22:01 +01:00
stack-8.10.2.yaml Override nixpkgs for stack 2020-12-13 18:33:51 +01:00
stack-8.10.2.yaml.lock add stack version for ghc-8.10.1 2020-12-04 11:04:18 +01:00
stack-8.10.3.yaml using ghc-lib instead of ghc for compatibility with ghc8.10.3 2021-01-27 14:17:51 +01:00
stack-8.10.3.yaml.lock ghc-8.10.3 2021-01-27 11:29:19 +01:00
stack.yaml.lock save and fetch project info 2020-12-04 10:22:02 +01:00
unified.gif readme 2021-02-01 17:37:14 +01:00

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