HIE together with compatible plugins usually offers more features than the average Haskell multi-feature plugin + compatible plugins. Some exceptions are: IntelliJ IDEA which has a very good set of features (and HIE does not have an IDEA plugin yet) and Leksah (which also does not have a HIE plugin but offers quite a lot of features itself).
To see a list of Haskell IDE Engine features see: HIE features
For a list of editor / IDE features see: rainbyte/haskell-ide-chart
Choose your operating system and continue the steps required for it:
gpedit.msc
and press Enter.Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem
Enable Win32 long paths
Enabled
OK
Local Group Policy Editor
Save as...
and save it with extension .reg
Yes
Git Bash Here
git clone https://github.com/haskell/haskell-ide-engine.git
cd haskell-ide-engine
stack ./install.hs hie-8.6.5
asynchronously (go graba cup of coffee, or do something else while it installs, etc. - it will take a while, took 44m 43s for me)stack ./install.hs data
Nix is a package manager that is very good at doing successful installs.
If you require any system level libraries to use in the project you are working on it is recommended to use Nix to provide them and then do your development inside a nix-shell
.
Doing Haskell development on Windows is not recommended since many Haskell packages have issues building on Windows. For doing development while using Widnows as your OS the recommended options are to use either a VMWare virtual machine (preferred) or Windows Subsystem for Linux (unrecommended since the build times are much slower).
Developing on Linux or MacOS should work fine.
To install Nix in your OS run:
curl https://nixos.org/nix/install | sh
Create the file ~/.config/nixpkgs/config.nix
and copy paste this into it:
with import <nixpkgs> {};
{
allowUnfree = true;
packageOverrides = pkgs: rec {
all = pkgs.buildEnv {
name = "all";
paths = [
haskell.compiler.ghc865
haskellPackages.cabal-install
binutils.bintools # required on WSL
];
};
};
}
And run following command to install the GHC
and cabal-install
packages:
nix-env -i all
Editors that are easy to set up are Atom, Visual Studio Code, IntelliJ IDEA Community or Sublime Text 3.
Editors / IDEs list and their Nix package name:
To install:
~/.nixpkgs/config.nix
nix-env -i all
to install the editors you choseContinue with:
In ~/.config/nixpkgs/config.nix
add to the let
variables:
all-hies = import (fetchTarball "https://github.com/infinisil/all-hies/tarball/master") {};
and add following to the list of packages - change the GHC list to the ones you will want to have available (eg. ghc865
or ghc865 ghc864 ghc843
):
(all-hies.selection { selector = p: { inherit (p) ghc865; }; })
if you wish to install HIE for all GHC versions because you switch between projects with different GHC versions a lot then you can use this instead:
(all-hies.selection { selector = p: p; })
installing all HIE versions will take a long time to install
after adding HIE your configuration should look something like the following:
with import <nixpkgs> {};
let
all-hies = import (fetchTarball "https://github.com/infinisil/all-hies/tarball/master") {};
unstable = import <nixpkgs> { inherit config; };
in
{
allowUnfree = true;
packageOverrides = pkgs: rec {
all = pkgs.buildEnv {
name = "all";
paths = [
binutils.bintools # required on WSL
haskell.compiler.ghc865
haskellPackages.cabal-install
unstable.haskellPackages.stack
unstable.haskellPackages.cabal2nix
haskellPackages.hoogle
haskellPackages.ghcid
(all-hies.selection { selector = p: { inherit (p) ghc865; }; })
];
};
};
}
run nix-env -i all
to install HIE
Installing Hasklig fonts on Windows:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
to install the package manager Chocolateychoco install hasklig
to install the Hasklig fonts on your operating systemEnabling Hasklig fonts:
setting
Preferences: Open Settings (JSON)
make sure you have the following in your settings:
"editor.fontFamily": "Hasklig"
"editor.fontLigatures": true
Alternatives to HIE:
Alternatives to HIE:
Alternatives to HIE:
Alternatives to HIE:
Alternatives to HIE:
Alternatives to HIE: