
1 Jan
2010
1 Jan
'10
7:15 p.m.
Thanks, this worked great. Just a few seconds to link in a 5M tarball. Details: test.s: .global test_data test_data: .byte 0 .byte 1 .byte 2 ... Foo.hs: import Foreign import Data.ByteString.Internal import Data.Word import System.IO.Unsafe foreign import ccall "&" test_data :: Ptr Word8 test :: ByteString test = fromForeignPtr (unsafePerformIO (newForeignPtr_ test_data)) 0 lengthOfTestData Compiled with: ghc --make -W -fglasgow-exts -o something test.s ...