static constants -- ideas?

Don Stewart dons at
Sun Feb 24 22:23:34 EST 2008

> Jason Dusek jason.dusek at
> >  I have an awkward programming problem -- I need to take a
> >  dictionary, parse it, build a bunch of intermediate lists and
> >  then make maps and tries out of the list. A "programming
> >  problem" because it's taken me a fair amount of effort to pull
> >  together the parser and list generator -- and "awkward"
> >  because a 69000 item list, [(String, [(String, String)])],
> >  does not compile under GHC (stack overflow).
> I also have constants that are too large to compile. I am resigned to
> loading them from data files--other solutions seem even worse.
> With data files:
> - The program starts up more slowly.
> - The code is more complex.
> - There may be some hassles with laziness.
> - Distributing the executable is not as simple.
> Data.Binary eases the irritation somewhat.

Did you try bytestring literals (and maybe parsing them in-memory with

-- Don

More information about the Glasgow-haskell-users mailing list