Cabalhas been associated with a group of five ministers in the government of England's King Charles II. The initial letters of the names or titles of those men (Clifford, Arlington, Buckingham, Ashley, and Lauderdale) spelled cabal, and they have been collectively dubbed as the "Cabal Cabinet" or "Cabal Ministry." But these five names are not the source of the word cabal, which was in use decades before Charles II ascended the throne. The term traces back to cabbala, the Medieval Latin name for the Kabbalah, a traditional system of esoteric Jewish mysticism. Latin borrowed Cabbala from the Hebrew qabbālāh, meaning "received or traditional lore."
A cabal is a group of people who are united in some close design, usually to promote their private views or interests in an ideology, a state, or another community, often by intrigue and usually without the knowledge of those who are outside their group. The use of this term usually carries negative connotations of political purpose, conspiracy and secrecy.[1][2] It can also refer to a secret plot or a clique, or it may be used as a verb (to form a cabal or secretly conspire).[1][3]
It came into English via the French cabale from the medieval Latin cabbala, and was known early in the 17th century through usages linked to Charles II and Oliver Cromwell. By the middle of the 17th century, it had developed further to mean some intrigue entered into by a small group and also referred to the group of people so involved, i.e. a semi-secret political clique.[6]
In Dutch, the word kabaal, also kabale or cabale, was used during the 18th century in the same way. The Friesche Kabaal (Frisian Cabal) denoted the Frisian pro-Orange nobility which supported the stadholderate, but also had great influence on stadtholders Willem IV and Willem V and their regents, and therefore on the matters of state in the Dutch Republic.[10] This influence came to an end when the major Frisian nobles at the court fell out of favor. The word nowadays has the meaning of noise, uproar, racket.[11] It was derived as such from French and mentioned for the first time in 1845.[12]
Followers of the QAnon conspiracy theory use "The Cabal" to refer to what is perceived as a secret worldwide elite organization who, according to proponents, wish to undermine democracy and freedom, and implement their own globalist agendas.[13]
Cabal is a system for building and packaging Haskell libraries and programs. It defines a common interface for package authors and distributors to easily build their applications in a portable way. Cabal is part of a larger infrastructure for distributing, organizing, and cataloging Haskell libraries and programs.
The term cabal can refer to either: cabal-the-spec (.cabal files), cabal-the-library (code that understands .cabal files), or cabal-the-tool (the cabal-install package which provides the cabal executable); usually folks are referring to cabal-the-tool when they say cabal.
The recommended method to install the cabal executable is to use ghcup, which can manage multiple versions of cabal on Linux, Mac and Windows. Alternatively, you can install cabal using your distribution's package manager (if you are using Linux or Mac), or download the source or prebuilt binary from the Download page.
Before you try anything else, you may want to refresh the package index: cabal update
If you already have a new-ish version of cabal you can use the v2/new commands. Try the following: cabal new-install Cabal cabal-install
If this works, update the cabal command on your $PATH with the version installed. Some alternative installation methods from source code are described in the Cabal source repository.
This can happen if your package archive gets into a broken state. How to fix this depends on the situation. Sometimes re-running the command with --force-reinstalls works, other times you have to remove your whole package archive and start over again.
I switched reluctantly to stack years ago. I understand that cabal improved lots since then and has some benefit (especially less disk space If I am right).
So is it worth switching back to cabal and if so how to ?
Switching is usually a matter of running hpack one last time, learning about the latest syntax of Cabal files to clean things up, learning about Cabal projects to recover a lot of the features I (for one) needed most from Stack, and just using cabal build, cabal test, and cabal repl. Plenty of things are still easier to do with Stack, and if you run into one, I hope that there is an issue about it. If not, please open it.
I like Stack for general development. The snapshot is a quick way of knowing all of my deps are pinned, and any packages not in the snapshot have to explicitly be mentioned in extra-deps. You can write a cabal.freeze file to act like a snapshot, but cabal doesnt error if you use a package thats not there (and thus not pinned).
The stack ls tools command will list the tools (principally versions of GHC) that Stack has installed given specified snapshots (if you are using Stack to manage GHC, rather than GHCup) - see ls command - The Haskell Tool Stack.
Yesterday I learnt about a new Haskell tool called Stack. At the first blush, it looks like it does much the same job as Cabal. So, what is the difference between them? Is stack a replacement for Cabal? In which cases should I use Stack instead of Cabal? What can Stack do that Cabal can't?
Stack uses the curated stackage packages by default. That being so, any dependencies are known to build together, avoiding version conflict problems (which, back when they were commonplace in the Haskell experience, used to be known as "cabal hell"). Recent versions of Cabal also have measures in place to prevent conflict. Still, setting up a reproducible build configuration in which you know exactly what will be pulled from the repositories is more straightforward with Stack. Note that there is also provision for using non stackage packages, so you are good to go even if a package isn't present in the stackage snapshot.
Personally, I like Stack and would recommend every Haskell developers to use it. Their development is fast. And it has a much better UX. And there are things which Stack does which Cabal yet doesn't provide:
There is a nice blog post explaining the difference: Why is Stack not Cabal? While Cabal has, in the intervening years since that post, evolved so as to overcome some of the issues discussed there, the discussion of the design goals and philosophy behind Stack remains relevant.
In what follows, I will refer to the two tools being compared as cabal-install and stack. In particular, I will use cabal-install to avoid confusion with the Cabal library, which is common infrastructure used by both tools.
Broadly speaking, we can say cabal-install and stack are frontends to Cabal. Both tools make it possible to build Haskell projects whose sets of dependencies might conflict with each other within the confines of a single system. The key difference between them lies in how they address this goal:
When asked to build a project, stack will, rather than going to Hackage, look at the resolver field of stack.yaml. In the default workflow, that field specifies a Stackage snapshot, which is a subset of Hackage packages with fixed versions that are known to be mutually compatible. stack will then attempt to satisfy the dependencies specified in the .cabal file (or possibly the project.yaml file -- different format, same role) using only what is provided by the snapshot. Packages installed from each snapshot are registered in separate databases, which do not interfere with each other.
We might say that the stack approach trades some setup flexibility for straightforwardness when it comes to specifying a build configuration. In particular, if you know that your project uses, say, the LTS 15.3 snapshot, you can go to its Stackage page and know, at a glance, the versions of any dependency stack might pull from Stackage. That said, both tools offer features that go beyond the basic workflows so that, by and large, each can do all that the other does (albeit possibly in a less convenient manner). For instance, there are ways to freeze exact versions of a known good build configuration and to solve dependencies with an old state of Hackage with cabal-install, and it is possible to require non-Stackage dependencies or override snapshot package versions while using stack.
Lastly, another difference between cabal-install and stack which is big enough to be worth mentioning in this overview is that stack aims at providing a complete build environment, with features such as automatic GHC installation management and Docker integration. In contrast, cabal-install is meant to be orthogonal to other parts of the ecosystem, and so it doesn't attempt to provide this sort of feature (in particular, GHC versions have to be installed and managed separately, for instance through the ghcup tool).
From what I can glean from the FAQ, it seems that Stack uses the Cabal library, but not the cabal.exe binary (more correctly known as cabal-install). It looks like the aim of the project is automatic sandboxing and avoidance of dependency hell.
3a8082e126