Thank you Edsko and Andres. And thank you Mike. I have one immediate reaction: starting with cabal
is much too complicated for a beginner (since that’s what Mike asks about).
I am not a beginner – in the sense I’ve been programming in Haskell for ~15 years. OTOH I’m more like a beginner in that I’m a hobby programmer/ex-professional in commercial languages. I’m creating programs for my own entertainment, not to share with others, not to be long-lived/upgraded through many versions of the compiler or base packages. It also might be relevant I’m a Windows user; I’m allergic to command lines; I much prefer point-and-click.
So my use case is perhaps more like a student on an introductory semester to functional programming. I’ll be producing a series of self-contained applications. I’ll need some utilities – which I can grab through import
s at the top of my modules.
Edsko starts by saying there’s “nothing there”. But that’s not true. There’s a compiler; there’s the Prelude
; and there’s a whole bunch of utilities in Base
. Does a beginner need more than that? Perhaps my course provides some for me to download. As the Stack intro says
GHC comes with the libraries of certain Haskell packages (known as boot packages ) already installed in its global database of installed libraries. These include the library of the package base
, which is a dependency of almost all other packages, and …
For many years, GHC (or Hugs) +base was all I needed. Later I could use Hoogle to search for stuff, click through to Hackage, point-and-click to download and unpack the .tar
.
I don’t need a licence (why does Edsko even talk about that?). I don’t need versioning. I don’t have scarey-sounding things called ‘dependencies’; I just create a .hs
file and put some import
s.
(I think you should also mention that cabal
is both a file/directory format, with an internal language; and a toolset that uses that format. But there are other toolsets that use that format, like Stack
. It’s also a little confusing from the name whether ‘Stackage’ is intimately related to Stack
. I’ve never gotten anything from Stackage; why would I need to?)
Now, I’m sure this would all be much different if I were employed to program in Haskell/collaborate on a large application/support software artefacts that were long-lived. In that case, I’d expect the programming shop to have a whole bunch of policies and procedures for installing stuff and hosting it on servers, check-out/check-in/code reviews/etc. That’ll all be after I’ve got enthusiastic about Haskell.
For my situation, I have several times considered adopting cabal
or Stack
(and then there’s Nix
, at 9:30). Each time I’ve been scared off by the complexity. You’ve scared me again.