[Haskell-cafe] Linking in Large ByteStrings

Svein Ove Aas svein.ove at aas.no
Fri Jan 1 17:33:01 EST 2010


On Fri, Jan 1, 2010 at 8:11 PM, John Millikin <jmillikin at gmail.com> wrote:
> On Fri, Jan 1, 2010 at 08:49, Svein Ove Aas <svein.ove at aas.no> wrote:
>> foo.hs
>> ===
>> foreign import ptr bytestring :: Ptr Word8
>> foreign import ptr bytestring_end :: Ptr Word8
>
> Is this valid syntax? I get a syntax error in 6.10.1, and I don't see
> it documented in the FFI report.
>
That's why I called it pseudocode.

No, it's not valid syntax, though it wouldn't have overly surprised me
if it were. You probably get the idea, though; importing a symbol,
instead of a function.

Actually reading the FFi got me this, though:

foreign import ccall "&" bytestring :: Ptr Word8
foreign import ccall "&" bytestring_end :: Ptr Word8


-- 
Svein Ove Aas


More information about the Haskell-Cafe mailing list