[Haskell-cafe] cabal-install problem with alex dependency in bytestring-lexing

wren ng thornton wren at freegeek.org
Fri Mar 16 22:43:17 CET 2012

On 3/16/12 6:00 AM, Erik de Castro Lopo wrote:
> Hi all,
> With a base system with just ghc and cabal-install, if I try to install
> bytestring-lexing I get:
>      $ cabal install bytestring-lexing
>      Resolving dependencies...
>      Configuring bytestring-lexing-0.4.0...
>      cabal: The program alex version>=2.3 is required but it could not
be found.
>      cabal: Error: some packages failed to install:
>      bytestring-lexing-0.4.0 failed during the configure step. The
exception was:
>      ExitFailure 1
> The cabal file for bytestring-lexing contains
>      Build-Tools:       alex>= 2.3
> Is there any way to make the cabal install of bytestring-lexing force
> the install of alex first?

FWIW, the Alex dependency is part of the code I inherited when taking over
bytestring-lexing. Apparently older versions of the library included
pre-generated versions of the files that Alex builds, prior to when Cabal
understood about build tools at all. I'm willing to go back that direction
if that's what folks want--- especially if there's a way to tell Cabal to
switch between the pregenerated files vs using Alex.

I've noticed that the code generated by Alex causes a lot of warnings,
some of them are of the "it will break in the future" variety. I've
considered rewriting the parsers for Double manually, but I'm not sure
exactly what the performance bottlenecks are in that context nor whether
anyone is actually using the current functions in performance-critical

To Erik specifically: my emails to you off-list have been bouncing/timing
out. Is there a chance I've ended up on a blacklist or there's some
configuration issue at mega-nerd.com?

Live well,

More information about the Haskell-Cafe mailing list