Clean is a general-purpose, pure and lazy functional programming language.
Clean is similar to Haskell and distinguishes itself through increased performance and relatively faster compilation times.
It was created by researchers at the Radboud University Nijmegen (then Katholieke Universiteit Nijmegen).
It comes with a package manager, nitrile.
Clean intends to:
- Encourage programmers to think about versioning and backwards compatibility.
- Make it easy to install different versions of Clean and libraries alongside each other.
- Have stable builds using the GitLab Continuous Integration infrastructure.
- Persist package versions decentrally in the GitLab package registries.
On this page:
- About this website and Nitrile
- How do I install Clean?
- What tools can I use to develop with Clean?
- Package search tricks
- How can I publish my own package to the registry?
- What are the conditions for contributing to the registry?
About this Website and Nitrile
This website aims to provide a basic Clean bundle as well as several libraries and a package manager, nitrile. These are collected in the central package registry (served by this website).
base package contains (forked versions of) the Clean compiler, code generator, run-time system, build tools, and standard library.
Upstream changes are regularly cherry-picked into these projects.
Nitrile is a package manager and build tool for Clean. It is used to manage dependencies, interact with the package registry, and build applications.
How do I install Clean?
The installation script depends on
Nitrile itself depends on
After installing these packages, run:
curl https://clean-lang.org/install.sh | /bin/sh
(To install a specific Nitrile version (e.g. 0.4.0), add
-s 0.4.0 to the
Afterwards, be sure to add
~/.nitrile/bin to your path.
Now run the following in an administrative shell:
Set-ExecutionPolicy ByPass -Scope Process -Force; (New-Object System.Net.WebClient).DownloadString('https://clean-lang.org/install.ps1') | powershell -Command -
(To install a specific Nitrile version (e.g. 0.4.0), run
$Env:NitrileVersion = '0.4.0' beforehand.)
You may need to reboot for
nitrile to be available in your path.
You may now want to follow the Nitrile getting started guide.
What tools can I use to develop with Clean?
There are several dedicated editor plugins used to develop in Clean, the plugins below provide syntax highlighting and may provide several other features:
There is a dedicated search engine for the entire nitrile registry:
- Cloogle: a search engine for Clean. It indexes the packages in the registry, and is updated nightly.
The following highlighters can be used:
Package search tricks
You can search in a package's title, description, readme, and changelog. The following tricks can be used:
foo*to match words beginning with
changelog:footo limit a term to one field
foo^5 barto make
foo5 times more important than
- Forced inclusion and exclusion:
+foo bar -bazmust include
fooand may not include
See the lunr.js search guide for more details.
How can I publish my own package to the registry?
See the Nitrile instructions.
What are the conditions for contributing to the registry?
Contributions should be in line with the project goals describe above. The project maintainer retains the right to remove any package at any time without giving a reason.