ekmett/bits — pull request #7 by rjmac (2014-12-14 16:32:02+00:00)
Title: Allow bits to be built for GHCJS

GHCJS doesn't support linking to C, naturally, so I made `Data.Bits.Extras` optionally use `unsafeIndex` into `ByteString`s instead of linking to static C arrays.

Now that the tables exist in both C and Haskell, there is a generator script to produce them both so that the canonical list of magic numbers can be in only one place. Cabal doesn't really have great support (or indeed as far as I can tell, any support) for ad-hoc pre-build code generation like this, so it's a Python program with the outputs checked in.