On May 31, 2010, at 3:02 PM, Tom Hawkins wrote: >> For instance, the LLVM.FFI.BitReader module has some functions that'll get >> you a ModuleRef from some bitcode. > > getBitcodeModuleInContext :: ContextRef -> MemoryBufferRef -> Ptr > ModuleRef -> Ptr CString -> IO Bool > type ModuleRef = Ptr Module > data Module > > I'm confused how this works. How does one get a Ptr ModuleRef to call > this function? Module is not Storable, so you can't use alloca or > malloc. And I don't see any functions in the library that returns a > Ptr ModuleRef. What am I missing? (Sorry, I lack experience with > Foreign.Ptr.)
That's a good question, and I'm not sure of the answer. I based my previous email purely on a quick scan the documentation. I've never actually tried to use it. :) Aaron_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe