[Numeric] autogenerated BLAS and LAPACK interfaces

Henning Thielemann lemming at henning-thielemann.de
Sat Dec 16 11:13:08 UTC 2017


I have just uploaded these packages:

https://hackage.haskell.org/package/netlib-ffi-0.0
https://hackage.haskell.org/package/netlib-carray-0.0
https://hackage.haskell.org/package/blas-ffi-0.0
https://hackage.haskell.org/package/blas-carray-0.0
https://hackage.haskell.org/package/lapack-ffi-0.0
https://hackage.haskell.org/package/lapack-carray-0.0
https://hackage.haskell.org/package/lapack-ffi-tools-0.0

The netlib packages provide definitions used by the other packages. The 
"ffi" packages provide foreign imports of all functions from the 
corresponding netlib package. The "carray" packages contain mid-level 
functions that use CArrays for vectors and matrices and try to get input 
and output values right according to the FORTRAN comments. CArrays might 
not be really appropriate since we always use zero-based arrays but this 
cannot be expressed in the type. A zero-based variant of CArrays might be 
better in the future. I use closed-world classes for generalizing 
functions that are generalizable. This way, I can add "methods" without 
extending the class.

The packages use very basic techniques. No C code, no HSC, no C2HS, no 
template Haskell, only plain Haskell 2010 with ForeignFunctionInterface.

I still have no good idea how to cope with Characters. They are used like 
enumeration elements, thus the enumerations deserve custom newtype 
wrappers. But not all enumeration elements are allowed everywhere. I am 
also uncertain whether to use these wrappers already in the "ffi" packages 
or only in "carray".

I have also not included the FORTRAN comments in the Haskell packages. I 
have only included links to online docs where available.


More information about the Numeric mailing list