[Haskell-cafe] HDBC-postgresql and safe/unsafe FFI calls

Jason Dagit dagit at codersbase.com
Thu Sep 2 01:21:42 EDT 2010


On Wed, Sep 1, 2010 at 10:00 PM, David Powell <david at drp.id.au> wrote:
>
> Thanks Jason, I think I had read that - I quite enjoy Edward's posts.
> Re-reading, seems to confirm what I thought, most (all?) of the FFI calls in
> HDBC-postgresql should be changed to "safe".

Yes I think so.  Unless you know the call is going to always return
quickly, then to me it sounds like you want safe.  For example, C's
sine function would make sense to be imported unsafe, but if you're
doing a slow query or an http request, better to use safe.

Jason


More information about the Haskell-Cafe mailing list