Haskell is a general-purpose, statically-typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research and industrial application, Haskell has pioneered a number of advanced programming language features such as type classes, which enable type-safe operator overloading. Haskell’s main implementation is the Glasgow Haskell Compiler (GHC). It is named after logician Haskell Curry.

Toolchains

  • Installation management ghcup
  • The compiler implemention ghc
  • The package/build system cabal-install, hackage
  • The toolchain manage: stack

What’s the differnce between cabal-install, stack

  • Cabal is a sepcification for defining how Haskell application and libraries should be built, defining denpendencies, etc.
  • .cabalis the file format used to write down te aforementioned definitions for sepcific package.
  • cabal-install stackboth implemented with Caballibrary, they are the frontend of Cabal, but has different strategy to resolve dependencies.
  • cabal-install using an approach called as “Nix-style local builds”.
  • stack use resolver to find the proper package, with snapshot, which is a subset of Hackage packages with fixed versions.
  • Besides, stack aims at providing a complete build environment, with features such as GHC installation and Docker integration.
  • Discussions online.
  • See. haskell discourse
  • See. stackoverflow question
  • See. github gist