Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: how to convert an array of foreignPtr a into a list of
Ptr a (鲍凯文)
2. Re: how to convert an array of foreignPtr a into a list of
Ptr a (PICCA Frederic-Emmanuel)
----------------------------------------------------------------------
Message: 1
Date: Tue, 3 Sep 2019 01:52:59 -0700
From: 鲍凯文 <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] how to convert an array of foreignPtr
a into a list of Ptr a
Message-ID:
<camjcg+ex5p5ccf610pgb0o3wjbiojifwh73g7t1bcbowjz2...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hi Frederic,
I tried writing my thoughts on your question in this gist here:
https://gist.github.com/darcykimball/74dd7973b2dbad22b7091135a3b9d472.
There's probably much more to it than what I wrote, but I'm figuring that
stuff out the more I think about it. I'll try to add more when I'm
convinced I get it.
Best,
Kevin
On Tue, Aug 27, 2019 at 5:56 AM <[email protected]> wrote:
> Send Beginners mailing list submissions to
> [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
> or, via email, send a message with subject or body 'help' to
> [email protected]
>
> You can reach the person managing the list at
> [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Beginners digest..."
>
>
> Today's Topics:
>
> 1. how to convert an array of foreignPtr a into a list of Ptr a
> (PICCA Frederic-Emmanuel)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 27 Aug 2019 07:19:25 +0000
> From: PICCA Frederic-Emmanuel
> <[email protected]>
> To: "The Haskell-Beginners Mailing List - Discussion of primarily
> beginner-level topics related to Haskell" <[email protected]>
> Subject: [Haskell-beginners] how to convert an array of foreignPtr a
> into a list of Ptr a
> Message-ID:
> <
> a2a20ec3b8560d408356cac2fc148e53016cf53...@sun-dag3.synchrotron-soleil.fr>
>
> Content-Type: text/plain; charset="us-ascii"
>
> Hello, I am writing some code whcih use FFI.
>
> one of my C functions has an array of pointer has imput
>
> extern HklBinocularsCube *hkl_binoculars_cube_new(int32_t n_spaces,
>
> const HklBinocularsSpace **spaces);
>
>
> from Haskell, I have a list of ForeignPtr
> so my question how can I have something like withForeignPtr for an array
> of ForeignPtr
>
> [ForeignPtr a] -> ([Ptr a] -> IO b) -> IO b
>
> Thanks for your help.
>
> Frederic
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>
> ------------------------------
>
> End of Beginners Digest, Vol 134, Issue 4
> *****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.haskell.org/pipermail/beginners/attachments/20190903/7c9ef3b3/attachment-0001.html>
------------------------------
Message: 2
Date: Tue, 3 Sep 2019 09:01:21 +0000
From: PICCA Frederic-Emmanuel
<[email protected]>
To: "The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell" <[email protected]>
Subject: Re: [Haskell-beginners] how to convert an array of foreignPtr
a into a list of Ptr a
Message-ID:
<a2a20ec3b8560d408356cac2fc148e53016cf58...@sun-dag3.synchrotron-soleil.fr>
Content-Type: text/plain; charset="us-ascii"
thanks you very much.
it is a very helpfull explaination.
Cheers,
Frederic
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 135, Issue 1
*****************************************