[Haskell-cafe] Cabal problem, broken packages?

Tom Ellis tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk
Thu Sep 15 16:38:51 UTC 2022


On Thu, Sep 15, 2022 at 12:25:11PM -0400, Brandon Allbery wrote:
> It looks good because you're using it the way you're supposed to
> instead of blindly using --lib to install things. That creates
> dependency issues like what you're having. Basically, don't use --lib
> unless you know what you're doing.

+1, although I'm yet to see evidence that anyone knows what
they're doing with --lib.

Unfortunately instructions like

  This package can be installed using the Cabal package manager for
  Haskell by issuing the following command:
  
  cabal install QuickCheck

are still prevalent around the web.  When the user tries he or she
gets the response


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: Installation might not be completed as desired! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The command "cabal install [TARGETS]" doesn't expose libraries.
* You might have wanted to add them as dependencies to your package. In this
case add "QuickCheck" to the build-depends field(s) of your package's .cabal
file.
* You might have wanted to add them to a GHC environment. In this case use
"cabal install --lib QuickCheck". The "--lib" flag is provisional: see
https://github.com/haskell/cabal/issues/6481 for more information.


The next natural course of action is "cabal install --lib".

Tom


More information about the Haskell-Cafe mailing list