[Haskell-cafe] Re: Fwd: installing happy 1.17
duncan.coutts at worc.ox.ac.uk
Sat Jun 7 13:44:48 EDT 2008
On Sat, 2008-06-07 at 09:36 -0700, Thomas Hartman wrote:
> cabal issue?
Yes and no.
What is happening is that there are several versions of the Cabal
library installed. In particular Cabal-1.3.12 and Cabal-1.5.2. The happy
package uses build-type Custom so cabal-install compiles the Setup.lhs
script. The question is what version of the Cabal library should it use?
The happy.cabal file specifies cabal-version: >= 1.2 so we'd better
respect that. But even then we have several choices. Currently it just
picks the highest one of the remaining choices. In this case that meant
Cabal-1.5.2 -- the latest development version. This version turns out to
have API changes that means that we get a type error when compiling
Setup.lhs. As it happens, if cabal-install had picked one of the other
choices then it would have compiled ok because the 1.2.x and upcoming
1.4.x series do not have those api changes.
The immediate workarounds are:
* unregister Cabal-1.5.2
* cabal install happy --cabal-lib-version 1.3.12
Perhaps a better solution is for cabal-install to choose the version of
the Cabal library differently. Of course it has to be within the hard
constraints specified in the .cabal file and on the command line. But
after that perhaps it should prefer the version of the Cabal library
that it itself was built with and at second preference the latest
version in the same major series. The last preference would be as now,
the latest version available.
> ---------- Forwarded message ----------
> From: Thomas Hartman <tphyahoo at gmail.com>
> Date: 2008/6/7
> Subject: installing happy 1.17
> To: haskell <haskell-cafe at haskell.org>
> I had a problem installing happy 1.17 (same result with happy head).
> This appears to be required for installing happs-hsp-template via
> cabal install.
> thanks for any advice!
> thartman at thartman-laptop:~/haskellInstalls/smallInstalls>darcs get
> --partial http://darcs.haskell.org/happy/
> Copying patch 87 of 87... done.
> Applying patch 86 of 86... done.
> Finished getting.
> thartman at thartman-laptop:~/haskellInstalls/smallInstalls>cd happy
> thartman at thartman-laptop:~/haskellInstalls/smallInstalls/happy>runghc
> Setup.lhs configure
> Setup.lhs:30:43: Not in scope: `buildVerbose'
> thartman at thartman-laptop:~/haskellInstalls/smallInstalls/happy>cabal --version
> cabal-install version 0.4.9
> using version 1.3.12 of the Cabal library
> thartman at thartman-laptop:~/haskellInstalls/smallInstalls/happy>ghc-pkg
> list | grep -i cabal
> Cabal-188.8.131.52, Cabal-1.3.11, Cabal-1.3.12, Cabal-1.5.2,
More information about the Haskell-Cafe