
1 Mar
2008
1 Mar
'08
3:24 p.m.
Jason Dusek jason.dusek@gmail.com:
Bryan O'Sullivan
wrote: 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.
For my particular application, I really need to ship a single static binary that has it all -- data as well as algorithms -- so I'm going with the FFI. It's too bad that I end up working in the IO monad much of the time. I hope we'll have massive static constants someday soon!
unsafePerformIO should be safe on constants, right? It has worked for me, at least. Jay