static constants -- ideas?

Jay Scott jay at satirist.org
Sun Feb 24 22:21:36 EST 2008


Jason Dusek jason.dusek at gmail.com:
>  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.

  Jay



More information about the Glasgow-haskell-users mailing list