Downloads

Binary distributions are not available at this time, so clash will have to be installed from source.

How do I install Clash?

Please file a bug report if the following installation instructions do not work for you.

The CλaSH compiler is written in Haskell and is compiled from source using the GHC Haskell compiler version 8.2 or later:

  1. Install GHC 8.4

    • Download GHC for your platform. Unix users can use ./configure --prefix=<LOCATION> to set the installation location
    • Make sure the bin directory of GHC is in your PATH

    In case you cannot find what you are looking for on https://www.haskell.org/ghc/download_ghc_8_4_3, you can, alternatively, use the following instructions:

    • Ubuntu:
      • sudo add-apt-repository -y ppa:hvr/ghc
      • sudo apt-get update
      • sudo apt-get install cabal-install-2.2 ghc-8.4.3 libtinfo-dev
      • update your PATH with: /opt/ghc/8.4.3/bin, /opt/cabal/2.2/bin and $HOME/.cabal/bin
      • Run `cabal update
      • Skip step 2.
    • OS X:
      • Follow the instructions on: Haskell Platform Mac OS X to install the minimal Haskell platform.
      • Run cabal update
      • Skip step 2.
    • Windows:
      • Follow the instructions on: Haskell Platform Windows to install the minimal Haskell platform
      • Run cabal update
      • Skip step 2.
  2. Install Cabal (version 2.2)

    • Binary, when available:
      • Download the binary for cabal-install
      • Put the binary in a location mentioned in your PATH
      • Add cabal’s bin directory to your PATH:
        • Windows: %appdata%\cabal\bin
        • Unix: $HOME/.cabal/bin
    • Source:
      • Download the sources for cabal-install
      • Unpack (tar xf) the archive and cd to the directory
      • Run sh bootstrap.sh
      • Follow the instructions to add cabal to your PATH
    • Run cabal update
  3. Install Clash

    • Run:
      • Linux: cabal install clash-ghc --enable-documentation --enable-executable-dynamic
      • Other: cabal install clash-ghc --enable-documentation
      • If you get the error can't load .so/.DLL for: libtinfo.so (libtinfo.so: cannot open shared object file: No such file or directory), add a symlink from libtinfo.5.so to libtinfo.so, and retry the cabal install process.
    • This is going to take awhile, so have a refreshment xkcd