[Haskell-cafe] Re: cabal install HaXml installs wrong version unless I specify the version number

Thomas Hartman tphyahoo at gmail.com
Sat Nov 15 06:39:53 EST 2008

When I specify

Build-Depends:  base, parsec, HaXml >= 1.19.4

in xml-parsec.cabal

it does install correctly.

I guess what happens is that cabal install takes the earliest version
of a package registered to try to build. I guess that's a reasonable

What seems unreasonable to me is that cabal continued to take the
earlier version even after I hid it with ghc-pkg hide.

My advice would be to improve the error message to read

"...    Could not find module `Text.XML.HaXml.Posn':
      it is a member of package HaXml-1.19.4, which is hidden
      It can be unhidden by adding

      Build-Depends: HaXml >= 1.19.4

  to xml-parsec.cabal"

That leaves the issue of cabal upgrade not upgrading to the latest
version available on hackage, which still feels like a real bug to me.

Best, Thomas.

2008/11/15 Thomas Hartman <tphyahoo at gmail.com>:
> I was upgrading happstutorial.com to ghc 6.10.1 when I came across a
> cabal install issue.
> Somewhere in day 1 (probably as a HAppS dependency), HaXml 1.13.1 got installed.
> On day 2, I wanted the latest version of HaXml (1.19.4), a dependency
> for for xml-parsec.
> cabal install HaXml gave me: already installed.
> cabal upgrade HaXml gave me: some installing action, but in the end I
> wound up with 1.13.1 again.
> cabal install HaXml-1.19.4 gave me what I want, the latest version.
> But even then, when I do cabal install xml-parsec I get
> Text/ParserCombinators/Parsec/XML.hs:18:7:
>    Could not find module `Text.XML.HaXml.Posn':
>      it is a member of package HaXml-1.19.4, which is hidden
> The cabal file has
> Build-Depends:  base, parsec, HaXml
>>ghc-pkg latest HaXml says
> HaXml-1.19.4
> Even after ghc-pkg hide HaXml-1.13.3
> I get the same result, so I'm not even sure if the problems I'm having
> are a result of the having two versions of the same package installed.
> This is a bug right?
> Any advice on how to get xml-parsec installed?
> thomas.

More information about the Haskell-Cafe mailing list