[Haskell-beginners] Large tables and GHC.

Patrick LeBoutillier patrick.leboutillier at gmail.com
Thu Dec 17 10:41:51 EST 2009


On Wed, Dec 16, 2009 at 11:05 PM, Sherard D. <scdames at gmail.com> wrote:
> Hi,
> I have a couple of rather large byte tables that I'd like to use. I decided
> to use them as arrays because I figured such large tables wouldn't work well
> as lists.
> table1 = listArray (0, 25599) [...]
> table2 = listArray (0, 25599) [...]
> This is how my code looks, minus the large tables. However, the problem is
> that the large tables are loaded as a list first, and then converted to an
> array. This is indeed a very big problem, as trying to compile with GHC
> takes an unacceptably long time.

If compilating time is only an issue while developping, maybe you can
put your tables in a separate module? That way they only get compiled
once (or when you change them) and they don't get recompiled when you
change the rest of your program.


> Is there any way I can get around this?
> - Sherard
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners

Patrick LeBoutillier
Rosemère, Québec, Canada

More information about the Beginners mailing list