[Haskell-cafe] hsb2hs preprocessor looking for a maintainer
Joachim Breitner
mail at joachim-breitner.de
Wed Aug 4 03:12:15 EDT 2010
Hi,
Am Mittwoch, den 04.08.2010, 08:05 +0100 schrieb Max Bolingbroke:
> On 4 August 2010 07:42, Joachim Breitner <mail at joachim-breitner.de> wrote:
> > out of a discussion in haskell-devscripts, John MacFarlane wrote a very
> > nice tool, called hsb2hs, that allows you to include any binary (or
> > text) file as a constant in your program.
>
> When I've needed to do this in the past, I've used a simple bit of
> Template Haskell:
the problem is that Template Haskell does not work on all architectures,
so the Debian people prefer solutions that avoid TH if it is not needed.
Yet another solution would be to create an ELF file contiangin the
binary blob as described in
http://burtonini.com/blog/computers/ld-blobs-2007-07-13-15-50
and link to it using FFI. But I’m not sure if there are any gains. Maybe
for very large files where even _parsing_ the string literal by ghc
takes too long.
Greetings,
Joachim
--
Joachim "nomeata" Breitner
mail: mail at joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C
JID: nomeata at joachim-breitner.de | http://www.joachim-breitner.de/
Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20100804/c197c8a1/attachment.bin
More information about the Haskell-Cafe
mailing list