[Haskell-cafe] Multi-line string literals are both easy /and/elegant in Haskell

Don Stewart dons at galois.com
Tue Oct 14 19:51:25 EDT 2008


mjm2002:
> On 10/13/08, Andrew Coppin wrote:
> > Cool. Is there any progress on getting GHC to *not* freak out when you
> > ask it to compile a CAF containing several hundred KB of string literal? :-}
> 
> Yes and no. There's dons' compiled-constants pkg which has a solution:
> 
>   http://code.haskell.org/~dons/code/compiled-constants/
> 
> And the code below would do all the haskell-side work for importing
> the data from C, but I'm not aware of a way to have ghc not freak out
> if it has to compile a huge amount of static data.

Hiding  it inside an unboxed string constant?
i.e.    

    "this be bits"#

Or does GHC still freak?

- Don


More information about the Haskell-Cafe mailing list