On Fri, Jan 1, 2010 at 8:11 PM, John Millikin <[email protected]> wrote:
> On Fri, Jan 1, 2010 at 08:49, Svein Ove Aas <[email protected]> wrote:
>> 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
Haskell-Cafe mailing list