libcurl, etc
David Roundy
droundy at abridgegame.org
Fri Mar 19 08:00:21 EST 2004
On Fri, Mar 19, 2004 at 11:36:15AM +0000, Graham Klyne wrote:
> David,
>
> on a whim I took a look at your website, and came across darcs, which it is
> claimed is:
> (a) written in Haskell, and
> (b) uses libcurl
>
> Does this mean you have a Haskell binding for libcurl? If so, it it for
> just GHC, or is it a fully-generalized FFI with (say) Hugs support as
> well?
Well, I have a very limited binding to libcurl, that's actually a bit ugly.
I use ffi, and wrote two functions in C. One initializes curl, and saves a
curl handle in a static global variable (so that curl can use a single http
session for several file downloads). Another downloads a URL and saves it
as a file. This second function involves four separate libcurl calls. For
me (and perhaps for most libcurl users) this is enough.
> Does it work for Windows as well as Unix/Linux?
Yes.
--
David Roundy
http://www.abridgegame.org
More information about the Libraries
mailing list