Convenience in Haskell: Ergonomics of Cabal

From an early version of the Cabal page on the Haskell site:

…but no mention of actually compiling packaged code - perhaps “Capal” would have been a better name. To me, it seems the intent here was more on packaging rather than compiling, which is only a consequence (or side effect) of Haskell currently being a compiled language - if Haskell was only interpreted, then packaging is all that’s required, with the interpreter eliminating the need for a compiling feature.

So while the ambiguous term “building” is thought of as both:

  • bundling the separate modules of a Haskell project into a conveniently-distributable format,

  • and the compilation process required to make that packaged code work for some specific Haskell implementation,

the confusion over what is and isn’t C4641 intended purpose will probably continue! Since Hackage is append-only the only way forward seems to be this suggestion:

[…] support both formats indefinitely (but will not advance the old format) […]

(thank you, @f-a!) That new format should not care about the minutiae of how the Haskell sources have to be “prepared ahead-of-time” for use with some particular implementation - that is a detail for that implementation to deal with, not the package format. But if you’re still not convinced, then just look at OS-packaging tools like apk or apt - if they have a "download-source-then-compile-locally" option at all, it’s usually standardised or compartmentalised on an entirely-separate “third-party” build tool e.g. make:

K.I.S.S.

1 Like