There are three widely used ways to install the Haskell toolchain on supported platforms. These are:
Generic Linux. This is a generic distribution of the Haskell Platform. While it should work on most modern Linux distributions, you may want to investigate use one of the distribution-specific options listed on the right. It's mostly working for me, but I've had similar problems after adding dependencies (sometimes) which were solved by running stack clean and restarting ghc-mod. I also had a problem when I upgraded ghc itself, which required removing ~/.ghc-mod. Jul 31, 2018 Every programming language needs a proper development environment. The Haskell Platform is created for writing, editing and compiling Haskell code. Aug 25, 2015 Haskell for Mac is an integrated graphical development environment for Haskell projects, avoiding arcane installation procedures and cryptic command line tools. It includes a project organizer, a Haskell code editor, and playgrounds for interactive code execution.
These options make different choices as to what is installed globally on your system and what is maintained in project-specific environments. Global installations allow more sharing across users and projects, but at the cost of potential conflicts between projects. To avoid these conflicts, each option has a lightweight sandboxing feature that creates largely self-contained, per-project environments. With Minimal you can optionally sandbox the libraries, avoiding most conflicts. Stack sandboxes the compiler, tools and libraries, so avoids nearly all kinds of conflicts between projects. With Platform you can also optionally sandbox libraries, but not the globally installed platform libraries.
Haskell IDEs & other distributions
In addition to the generic, cross-platform Haskell toolchain described above, there are also easy-to-use, platform-specific distributions and IDEs. The Haskell Wiki contains a list of the most popular ones.
Minimal installersWhat they are
Minimal installers provide centrally the GHC compiler and the Cabal and Stack tools for installing packages. Some may install further build tools (i.e. for parsing and lexing) as well.
What you get
How to get them
Where to get help
StackWhat it is![]()
Stack is a cross-platform build tool for Haskell that handles management of the toolchain (including the GHC compiler and MSYS2 on Windows), building and registering libraries, and more.
![]() What you get
How to get it
The install and upgrade page describes how to download Stack on various platforms, although the main three are repeated here:
Fundraising Software
Instructions for other Linux distributions, including Debian, Fedora, Red Hat, Nix OS, and Arch Linux, are also available.
Where to get help
For help with Haskell and GHC in general, see the links mentioned above. For Stack itself there are also the following resources:
Download Haskell PlatformHaskell PlatformWhat it is
The Haskell Platform is a self-contained, all-in-one installer. After download, you will have everything necessary to build Haskell programs against a core set of useful libraries. It comes in both core versions with tools but no libraries outside of GHC core, or full versions, which include a broader set of globally installed libraries.
What you get
How to get it
The Platform is provided as a single installer, and can be downloaded at the links below.
Where to get help
Additional Libraries
In Haskell, packages are configured and built with the Cabal package system built into GHC (and other compilers). For more specific details, see The Cabal User Guide. The command line tools to download and install packages are either
cabal or stack , each having different workflows. For details on their usage, see the documentation above.
Hackage
Hackage is a repository of packages to which anyone can freely upload at any time. The packages are available immediately and documentation will be generated and hosted there. It can be used by cabal install.
You can install a package using cabal by running:
Note that if you are not in a sandbox, this will install the package globally, which is often not what you want, so it is recommended to set up sandboxes in your project directory by running
cabal sandbox init .
LTS Haskell
LTS Haskell is a stackage-based long-term support set of packages which build and pass tests together, with backported bug fixes.
Stackage Nightly
Stackage is a nightly generated stable repository of snapshots of package sets in which only packages which build and pass tests together are bundled together into a snapshot.
From source control repositories
Installing from a source repository is also possible. For example, to clone and install the network package from source, you would run:
Or:
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |