Re: static constants -- ideas?

2008-02-24 Thread Don Stewart
jason.dusek: > 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 li

Re: static constants -- ideas?

2008-02-24 Thread Jason Dusek
Don Stewart <[EMAIL PROTECTED]> wrote: > You can build large constant bytestrings, fwiw. They turn into > an Addr#, and GHC will leave them alone. Well, for my particular problem -- I guess I could align all the elements of the lists, and then build the trie and maps from the ByteStrings at

Re: static constants -- ideas?

2008-02-24 Thread Don Stewart
jason.dusek: > Don Stewart <[EMAIL PROTECTED]> wrote: > > You can build large constant bytestrings, fwiw. They turn into > > an Addr#, and GHC will leave them alone. > > Well, for my particular problem -- I guess I could align all > the elements of the lists, and then build the trie and maps >

Re: static constants -- ideas?

2008-02-24 Thread Jay Scott
Jason Dusek [EMAIL PROTECTED]: > 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

Re: static constants -- ideas?

2008-02-24 Thread Don Stewart
jay: > Jason Dusek [EMAIL PROTECTED]: > > 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 >

Re: static constants -- ideas?

2008-02-24 Thread Jay Scott
Don Stewart [EMAIL PROTECTED]: >jay: >> I also have constants that are too large to compile. I am resigned to >> loading them from data files--other solutions seem even worse. ... >> Data.Binary eases the irritation somewhat. > >Did you try bytestring literals (and maybe parsing them in-memory with

Re: static constants -- ideas?

2008-02-24 Thread Bryan O'Sullivan
Jay Scott wrote: > That didn't occur to me, since neither of my large constants includes > strings The trick I usually use in cases like this is to compile the data as C code and link against it, then access it from Haskell via a Ptr. http://www.haskell.org/mailman/listinfo/glasgow-h

Re: static constants -- ideas?

2008-02-24 Thread Don Stewart
jay: > Don Stewart [EMAIL PROTECTED]: > >jay: > >> I also have constants that are too large to compile. I am resigned to > >> loading them from data files--other solutions seem even worse. > ... > >> Data.Binary eases the irritation somewhat. > > > >Did you try bytestring literals (and maybe parsin