"Is cabal-install stable enough yet that GHC should be inflicting it on newbies?"

I agree: networking, HTML templating, XML parsing (these ones more to handle HTML code snippets rather than doing SOAP) and JSON parsing libraries are what’s “in” right now to setup a minimal web server. So you see those facilities in standard libs because webdev is what’s “in” right now.

This doesn’t have to do 100% with cabal-install: after years of Java before the intro to functional programming, Haskell is very alien. Or even, after years of doing webdev (JavaScript and React) while going through university, even Java is painful and something they must slog through.

I agree, I have a minimal cabal project myself. Not because I lack confidence, however.

You are right, there is always room for improvement, as I have shown that you can cut down the “simple” cabal init into an even simpler cabal init.

I don’t mean to handwave criticisms (“everything sucks so this is fine”) or be mean to the efforts of very talented people kindly donating their time to make our time in hell more pleasant. I like to learn from the good parts of other systems.

I’m pointing out that as programmers, no matter your language, we’re pretty much stuck as friends in hell together. Not only with package managers: product distribution, cross compiling, The One True Way Of Window Managing And Graphics, et al.

Inflict it on newbies with their own personal computer? Yes.

Inflict it on universities that don’t want to spare 1 TB on all the students combined naively downloading packages into their user folder? No. Install the packages used for teaching (if any) on GHC and expose them.

On university newbies, not necessarily. You can do Advent of Code with GHC as it is. You got filesystem handling, containers (with Data.Map, the most sought out data structure thanks to JavaScript and Java), text and parsec.

On advanced university students you might want attoparsec, megaparsec, lens, optics, SDL2, gloss, warp, pandoc, criterion. Maybe. Depends on what you want to teach. About cool stuff built? Or about tools to do profiling and analyzing runtime laziness? Or about functional dependencies and type families extensions?

On students learning enterprise? The universities won’t put GHC or Cabal. The JDK has a lot of tools to zip files, move them, open servers, do requests, serialize things, deserialize things, even Swing for quick user interfaces. If the university provides Glassfish or Wildfly then you have access to the Jakarta EE suite.
And Go and Python don’t stand short, that’s why the joke of “how to do X in Python” is “import X”. The next thing they do is pip install numpy and whatever the course demands for machine learning.

This is not to be mean on GHC, this is to show that newcomers might expect a lot of “batteries-included” coming from standard libraries with a lot of tools.

3 Likes