Ptr and ForeignPtr Questions
Ashley Yakeley
ashley@semantic.org
Wed, 10 Oct 2001 01:29:11 -0700
At 2001-10-10 01:19, I wrote:
> foreign import "foo" raw_foo :: Ptr () -> IO (Ptr ());
>
> foo :: Ptr SomeLinkedList -> IO (ConstPtr Char);
> foo = importFunction raw_foo;
Actually I don't need to convert the pointers, do I? If I have (Storable
SomeLinkedList), I can just declare
foreign import "foo" foo :: Ptr SomeLinkedList -> IO (Ptr Char);
and it should work. The only thing that's missing is a ConstPtr type...
--
Ashley Yakeley, Seattle WA