Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7031433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:48:10+00:00 2026-05-28T00:48:10+00:00

I find cabal ‘s behavior when installing packages maddening. For example, running cabal install

  • 0

I find cabal‘s behavior when installing packages maddening. For example, running

cabal install funsat

installed old versions of array, time, random, quickcheck, and bitset, breaking packages like monadiccp, hoogle, heist, snap, etc.

It works to go back and cabal install monadiccp, etc., but how can I avoid the default behavior of cabal breaking installed packages? Any reasonable Linux package manager, like aptitude or zypper would ask whether I wanted to break already installed packages, when installing a new package.

Has anyone cooked up a workaround script? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:48:10+00:00Added an answer on May 28, 2026 at 12:48 am

    I recommend cabal-dev, which maintains a separate set of installed packages for each project you work on. That doesn’t solve the bad behaviour of cabal-install in general, but means that such failures are more isolated than they would otherwise be, and allows you to fix them more easily by simply doing cabal-dev clean && cabal-dev install.

    The added benefit of reproducible builds is also nice.

    Admittedly, this isn’t a workaround for your specific problem, but it lessens cabal-install pain in general.


    Building on Daniel Fischer’s answer, here’s a wrapper for cabal that aborts an installation if it would reinstall a package:

    cabal () {
      if [ "$1" = "install" ]; then
        local out=$(command cabal --dry-run -v2 "$@" 2>&1)
        if echo "$out" | egrep -c '\((reinstall|new version)\)' >/dev/null; then
          echo "$out"
          return 1
        fi
      fi
      command cabal "$@"
    }
    

    YMMV; I’ve only lightly tested this and it causes an annoying delay at start-up as all the dependencies have to be calculated twice. But it should relieve some tedium if you want to stay on the safe side.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using cabal to download Haskell packages. The following works: > cabal install JSON
Find the time after 15 minutes of given time in javascript Example : given
Here's the message I get when trying to install in via cabal-install: $ cabal
The ~/.cabal/config stores configuration which cabal-install uses. I wanted to do some hackery on
I followed the instructions on http://www.haskell.org/haskellwiki/Gtk2Hs#Install_libxml to install gtk2hs on windows XP, after installing
Yesterday I had a failing darcs install with cabal, today I get this when
Find the first covering prefix of a given array. A non-empty zero-indexed array A
Find below my form and the action page it submits to. The _POST array
Find the middle of the string or array with an unknown length. You may
find whether there is a loop in a linked list. Do you have other

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.