[Haskell-cafe] Problem binding GEGL library

Theodore Lief Gannon tanuki at gmail.com
Sun Jun 19 21:38:42 UTC 2016


I have no experience with the FFI, but conceptually that sounds like a
Traversable, not necessarily a Monad. I'd start small, with the simplest
superclass, Functor -- so, implement fmap, then move on from there.
On Jun 19, 2016 6:48 AM, "nek0" <nek0 at nek0.eu> wrote:

> Hello fellow haskellers,
>
> I am currently working on Haskell bindings to the GEGL [0] library.
> Since it's my first time working with the FFI and the whole idea of
> binding a library into Haskell, I have now run into a problem I can't
> resolve myself.
> The GEGL headers expose a function "gegl_buffer_iterator_new" which
> returns an iterator over a selected area in a buffer. This iterator
> contains a float pointer with pixel data. My problem is to make the
> iterator and the data it contains accessible to Haskell and to iterate
> over it.
> Can someone of you please help me with this problem? One of my initial
> thoughts was to wrap it into a monad, but I am totally inexperienced
> with that.
> My project can be found on my Github profile [1].
>
> Many thanks in advance,
>
> nek0
>
> links:
>
> [0]: http://www.gegl.org/
> [1]: https://github.com/nek0/gegl
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160619/a9f37e49/attachment.html>


More information about the Haskell-Cafe mailing list