Cabal-install bug

wren ng thornton wren at
Mon Feb 6 00:56:46 CET 2012

On 2/5/12 6:41 PM, Brandon Allbery wrote:
> On Sun, Feb 5, 2012 at 18:19, wren ng thornton<wren at>  wrote:
>>     $>  cabal install --dry-run --jhc --verbose base
>>     Reading available packages...
>>     Resolving dependencies...
>>     cabal: internal error: impossible
>>     $>  cabal install --dry-run --ghc --verbose base
>>     Reading available packages...
>>     Resolving dependencies...
>>     cabal: Distribution/Client/**Dependency/TopDown.hs:171:37-**73:
>>         Non-exhaustive patterns in lambda
> base is supposed to be installable?!  I always understood that error to
> mean "base has to be built with the compiler, cabal-install is incapable of
> doing this for you".


(a) If I ask it to install "base-" or some other specific version 
instead of "base", then it says okay and tells me that's the package it 
would install (this is --dry-run remember).

(b) If I ask it to install a specific version without the --dry-run flag 
then it will indeed download the package and try it's best (though it 
fails in the configure step).

(c) But more particularly, the above messages indicate that the issue is 
a bug in cabal or cabal-install itself, rather than a bug in what I'm 
trying to do. Correct programs should never die due to exceptions like 
partial case analysis. The "internal error: impossible" message hints at 
this, though it would be nice if it gave more details about what/where 
things went wrong.

(d) If the intention is to exclude base as a special case, then it 
should be given an explicit error message, rather than relying on users 
to interpret a partial case analysis. If that is not the intention, then 
clearly there's a logic failure somewhere which allows the partial case 
analysis to fail.

Live well,

More information about the Libraries mailing list