Why so many "alive" versions of ghc at the same time? I believe that there is some technical reason but can't figure what exactly..
ghcup show 11 versions of ghc and one of those are marked as recommended. I couldn't find some explanation why that version is the recommended, thou...
I'm just trying to understand why the last version is not the recommended, and also why there is not just one version that is compatible with several versions of the language and the libs. I'm assuming that this is a hard problem to solve, but can't figure out why.
Just note: I'm using haskell for some time now but not an expert by any means.
Don't worry too much about it. It's not that the other versions are disrecommended, it's mostly just that with all those versions on offer GHCUP tries to make it easier for beginners to choose one that has low likelyhood of running into hiccups.
Why not recommend the newest one? – Two reasons:
Of course, you still want the newer versions available in GHCUP too, both to allow access to the shiniest of new features and so library developers can future-proof their packages.
Why not recommend an even older one? – This should be quite obvious:
Monad
did not have Functor
as a superclass, which could lead to awkward morally-duplicate constraints and whatnot. Obviously, beginners shouldn't be confronted with that.Again, that does not mean that old versions should not be available. They're kept in GHCUP both so it's possible to compile legacy code that just doesn't work with newer compilers (and hopefully develop it to change that!), and also to allow library developers to check whether their package is still compatible with an old compiler.