[Pkg-haskell-maintainers] Bug#669156: Illegal bang-pattern (use -XBangPatterns)

Erik de Castro Lopo mle+hs at mega-nerd.com
Sun Apr 22 04:04:20 UTC 2012


Hi all,

I have managed to debug this issue.

The problem is that upstream ships a file

    src/Language/JavaScript/Parser/Lexer.hs

that was generated by the alex lexer generator. However, compiling
alex generated files on big endian systems (like powerpc) requires
the BangPatterns LANGUAGE pragma.

The reason we don't see this elsewhere is that other projects ship
the alex source and Debian's alex is patched to fix this. Unfortunately
I was never able to push that patch upstream [0], but maybe its time
to try again with a slightly different version of the patch.

That brings us to the language-javascript problem. Firstly, we should
really ask upstream to ship the Lexer.x file from which the Lexer.hs
file is generated. However the reason they reason they ship the haskell
source rather than the lexer source is so that its possible to install
language-javascript using "cabal install". Cabal has one rather severe
limitation, it cannot reliably install build tools like alex. Firstly
there is no way to specify a dependency on a build tool, secondly
cabal install will install it by default in $HOME/.cabal/bin/ and if
that is not on the user's PATH, language-javascript will not compile.

Cheers,
Erik

[0] http://trac.haskell.org/haskell-platform/ticket/171
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/





More information about the Pkg-haskell-maintainers mailing list