Could C libraries be part of Haskell Platform?

Probably not, but... There are stable and portable libraries that implement functionality missing in Haskell. It could be nice to be able to list then in a cabal file (using, say, pkgconfig-depends) and know for sure that any system with Haskell Platform will have then available for use with FFI. An example would be sqlite3. To me, this seems to be ugly in theory and good in practice. Best, Maurício

On Jul 12, 2009, at 13:40 , Maurí cio wrote:
Probably not, but... There are stable and portable libraries that implement functionality missing in Haskell. It could be nice to be able to list then in a cabal file (using, say, pkgconfig-depends) and know for sure that any system with Haskell Platform will have then available for use with FFI. An example would be sqlite3.
I think we currently address this by including the C libraries with the Haskell bindings (e.g. zlib). -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

Probably not, but... There are stable and portable libraries that implement functionality missing in Haskell. It could be nice to be able to list then in a cabal file (using, say, pkgconfig-depends) and know for sure that any system with Haskell Platform will have then available for use with FFI. An example would be sqlite3.
w/o haskell binding it's useless for most of HP users
I think we currently address this by including the C libraries with the Haskell bindings (e.g. zlib).
That, of course, would be the goal. Today, it's disappointing to write bindings, since Hackage won't build them properly (since the libraries are not installed on hackage. Of course, for simple packages like zlib or sqlite3 you have the alternative of including them with your code). If good C libraries were available in HP, bindings would flourish. Maurício

On Jul 12, 2009, at 19:38 , Maurí cio wrote:
That, of course, would be the goal. Today, it's disappointing to write bindings, since Hackage won't build them properly (since the libraries are not installed on hackage. Of course, for simple packages like zlib or sqlite3 you have the alternative of including them with your code). If good C libraries were available in HP, bindings would flourish.
This isn't clear to me; in general you only need to bind them once and then they're available in Haskell. Why not include the library with its bindings? -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

On Jul 12, 2009, at 20:06 , Brandon S. Allbery KF8NH wrote:
This isn't clear to me; in general you only need to bind them once and then they're available in Haskell. Why not include the library with its bindings?
The exception here is the still-evolving bindings to e.g. BLAS. It's not at all clear to me that including BLAS in the Haskell Platform is going to help with this; more important is having people who understand BLAS, who probably already have it, and making BLAS libs available won't help someone like me understand it well enough to work on the bindings. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

This isn't clear to me; in general you only need to bind them once and then they're available in Haskell. Why not include the library with its bindings?
There are many ways to bind to a library. The first one isn't usually the best. Including the library with its bindings means you have to take care of doing a portable distribution, something even the authors of libraries usually find difficult to do. Doing that on one place (like, say, Haskell Platform) means no one else will have to do it, at least for a set of libraries.
(...) and making BLAS libs available won't help someone like me understand it well enough to work on the bindings.
I hope not! If you can, avoid that kind of work, it won't do you any good. Other's like me, however, had to learn FFI, and would like to do as much as possible to avoid others having to do the same. However, it's not nice to work on bindings that I know others (including hackage) won't be able to build and criticize. Maurício
participants (3)
-
Brandon S. Allbery KF8NH
-
Bulat Ziganshin
-
Maurício