On Mar 16, 2012 3:12 PM, "Ivan Lazar Miljenovic" <ivan.miljeno...@gmail.com> wrote: > > On 17 March 2012 09:02, Erik de Castro Lopo <mle...@mega-nerd.com> wrote: > > Ivan Lazar Miljenovic wrote: > > > >> One trivial solution is to assume ~/.cabal/bin is on the PATH and to > >> ignore system-wide packages, which I think is even *more* sub-optimal > >> (why install a new version of alex when it's already available?). > > > > The tool should only install alex in ~/.cabal/bin if alex is not already > > available. > > So how does it know whether the *correct version* is available? Add > --version parsers for every single possible build-tool to > cabal-install?
That is (probably) how it knows that the necessary version of alex is not available. There actually is a standard format for checking version numbers of the core haskell build tools: --numeric-version produces output that is easily parsed (and matches the default parser for cabal Program values). I'm not at a computer to check alex specifically right now, but I'm fairly certain it is one of the builtin Programs that cabal can check. (you can also write your own, and put them in setup.hs if you need a special build tool.) There is, of course, nothing that says ask the build tools are going to be available on hackage (or even in haskell). I'm not sure how to fix this, really. We could make the build tools section produce more detailed instructions for installing missing tools in the case that cabal can't install them. -Rogan > > -- > Ivan Lazar Miljenovic > ivan.miljeno...@gmail.com > http://IvanMiljenovic.wordpress.com > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe