-
Notifications
You must be signed in to change notification settings - Fork 0
The Nirum official website
nirum-lang/nirum-lang.github.io
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
<!DOCTYPE html> <html><head><meta charset="utf-8"> <title>Contirubtion guide — Nirum</title> <meta name="generator" content="Nirum 0.5.0"> <meta name="author" content="Nirum team"> <link rel="stylesheet" href="style.css"> </head> <body> <nav><a class="index" href="index.html">Nirum</a> <ul class="manuals toc"><li><a href="docs/annotation.html">Annotations</a> </li> <li><a href="docs/package.html">Package</a> </li> <li><a href="docs/refactoring.html">Backward Compatible Refactoring</a> </li> <li><a href="docs/serialization.html">Serialization format</a> </li> <li><a href="docs/transport.html">Transport</a> </li> <li><a href="docs/tutorial.html">Step-by-step tutorial</a> </li> <li><a href="docs/target/docs.html">Docs target</a> </li> <li><a href="docs/target/python.html">Python target</a> </li> <li><a href="CHANGES.html">Nirum changelog</a> </li> <li class="selected"><a href="CONTRIBUTING.html"><strong>Contirubtion guide</strong> </a> </li> </ul> <ul class="modules toc"><li><a href="core/index.html"><code>core</code></code> — Built-in types</a> </li> </ul> </nav> <article><h1>Contirubtion guide</h1> <h2>Build</h2> <p>In the same way to other Haskell softwares, Nirum compiler can be built using <a href="https://haskellstack.org/">Haskell Stack</a>. If you didn’t install it yet see also its <a href="https://docs.haskellstack.org/en/stable/install_and_upgrade/">installation guide</a>.</p> <p>If it’s your first build of Nirum compiler you need to setup a proper version of GHC:</p> <pre><code class="language-bash">stack setup </code></pre> <p>The following command builds an executable binary of Nirum compiler:</p> <pre><code class="language-bash">stack build </code></pre> <p>A built executable binary aren’t installed to <code>PATH</code> until <code>stack install</code> command is run. Without installation a built executable binary can be invoked using <code>stack exec</code> command:</p> <pre><code class="language-bash">stack exec -- nirum -t python -o out/ examples/ </code></pre> <p>Note that <code>--</code> indicates options after it belong to the <code>nirum</code> executable, not <code>stack exec</code> command.</p> <h2>Testing scopes</h2> <p>Since it is a compiler which generate source codes, there are two scopes we should test:</p> <ol> <li>the compiler itself, and</li> <li>codes that the compiler generates.</li> </ol> <p>The former is unit testing and the latter one is integration testing. We have two commands/scripts to run corresponding testing:</p> <ol> <li><code>stack test :spec</code></li> <li><code>stack test :targets</code></li> </ol> <p>If you’ve changed things related to a target backend you should test everything:</p> <pre><code class="language-bash">stack test </code></pre> <p>If you’ve changed pure internals of the compiler probably it’s okay to run only the former command. Anyway both testings are run by CI so that changes breaking either testing cannot be merged.</p> <p><a href="https://travis-ci.com/nirum-lang/nirum"><img src="https://travis-ci.com/nirum-lang/nirum.svg?branch=master"></a> <a href="https://ci.appveyor.com/project/dahlia/nirum-k5n5y"><img src="https://ci.appveyor.com/api/projects/status/jf9bsrnalcb1xrp0?svg=true"></a></p> <h2>External dependencies</h2> <p>Each target test suite has its external dependencies (i.e., non-library program dependencies):</p> <ul> <li>Python <ul> <li>All Python versions that Nirum should support: Python 2.7, and 3.4 and above all</li> <li><a href="https://tox.readthedocs.io/"><code>tox</code></a> 3.0.0 or higher</li> </ul></li> </ul> <h2>Lint</h2> <p>Since we want to keep our coding style consistently, we run <a href="https://en.wikipedia.org/wiki/Lint_(software)">lint</a> to check it. You can get more information about <a href="https://github.com/ndmitchell/hlint">hlint</a> on its homepage.</p> <p>We recommend you to register lint to Git hooks.</p> <pre><code class="language-bash">ln -s "$PWD/lint.sh" "$PWD/.git/hooks/pre-commit" </code></pre> <p>If you have registered a hook once, it will be automatically executed when you make a commit.</p> <h2>Changelog</h2> <p>We believe logging changes is a part of making software. So we have the policy enforcing every pull request to have an entry to changelog (i.e., a diff on <em>CHANGES.md</em> file) on the <a href="https://github.com/nirum-lang/nirum/blob/7dcd1bbaffacff05d8ad91bf2018898ffdc3f0a6/.travis.yml#L45-L55">CI</a>.</p> <p>Please put <code>[chagelog skip]</code> on commit message if your change is not related to the Nirum compiler (e.g., fixing a typo).</p> </article> <div class="github"><a href="https://github.com/nirum-lang/nirum" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a></div> </body> </html>
About
The Nirum official website
Contributing
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published