I like the ListT suggestion and just implemented it.

I don't understand how I can get rid of SafeT by using Managed. You're
talking about Managed from your managed package right?

On 30 July 2017 at 15:58, Gabriel Gonzalez <gabriel...@gmail.com> wrote:

> Looks pretty straightforward to me
>
> The only other suggestion I'd provide is to also provide a `Managed`
> version of the same `Producer`, with this type:
>
>     query
>         :: (Default QueryRunner columns haskells, MonadIO m, MonadMask m)
>         => Connection -> Query columns -> Managed (Producer haskells m ())
>
> Also, since it doesn't use the return value, you could even use the
> simpler `ListT` type instead:
>
>     query
>         :: (Default QueryRunner columns haskells, MonadIO m, MonadMask m)
>         => Connection -> Query columns -> Managed (ListT m haskells)
>
> ... and then you can always convert that back to a `Producer` using
> `enumerate` if necessary
>
> On Jul 29, 2017, at 2:54 PM, Bas van Dijk <v.dijk....@gmail.com> wrote:
>
> Hello,
>
> I just started playing with pipes and I really like it so far. For my
> first project I would like to create a Producer for opaleye query results.
> I came up with the following:
>
>   https://github.com/basvandijk/pipes-opaleye/blob/
> master/src/Pipes/Opaleye/RunQuery.hs
>
> Is that the correct way of doing it? What can be improved?
>
> Thanks,
>
> Bas
>
> --
> You received this message because you are subscribed to the Google Groups
> "Haskell Pipes" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to haskell-pipes+unsubscr...@googlegroups.com.
> To post to this group, send email to haskell-pipes@googlegroups.com.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Haskell Pipes" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to haskell-pipes+unsubscr...@googlegroups.com.
> To post to this group, send email to haskell-pipes@googlegroups.com.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Haskell Pipes" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to haskell-pipes+unsubscr...@googlegroups.com.
To post to this group, send email to haskell-pipes@googlegroups.com.

Reply via email to