Suggestion

Build executable program written in Haskell statically. (For the convenient of package maintainer, remove Haskell library packages).

Reason

The advantage of dynamic linking is letting multiple executable sharing same part of code. The only benefit is to reduce storage consumption. But in nowadays, storage is getting cheaper and cheaper. It is no longer be a issue now. And Haskell packages are all relatively small.

However, here are a lot of drawbacks for dynamic linking of Haskell ecosystem.

  1. Firstly is dependency version conflict. If two package depend on a same package with exclusive permitted version range, it will be a big trouble.
  2. One dependency version update requires Arch Linux package maintainer update a series of packages which depend on this package. (Unlike Python, Haskell is compiled language with low ABI compatibility across different version).
  3. lack of link time optimization.
  4. Long time of upgrading via pacman. Updating many small package is really much slower than updating one big package. And registering Haskell module take a long time.

Why program written in C/C++ can be distributed in dynamical linking form?

C/C++ has very poor dependency resolver and package manager. C/C++ project need developer take care of dependency manually. And C/C++ compiler provide relatively stable ABI. None of those condition applies to Haskell.

Details of Action

Only providing:

When user install ghcup via pacman , the need to manually set default toolchain to install ghc and other tools.

All non-executable Haskell library become unnecessary. Since no Haskell developer will use haskell package provided by the Linux distro.

Expected Benefit

  1. package maintainer will save a lot of time on maintaining Haskell software.
  2. update will be much quicker.
  3. All Haskell program packages can easily up-to-date.

I believe the gain of this suggestion is significantly greater than the loss.


Evan