James Andrew Cook <[email protected]> writes:

> What an interesting coincidence, that makes at least three of
> us. Apparently it's an idea whose time has come.
>
> Mine is also an incomplete low-level binding but is currently under
> semi-active development and I aim to make it cover the entire hdf5.h
> interface.
>
> If anyone is interested in it I've put it on github at:
> https://github.com/mokus0/bindings-hdf5

Hi,

This is fairly extensive indeed!  I got nowhere near this, but also took
a somewhat different angle, especially by using StorableArrays for
passing arrays around (I used HDF5 in conjunction with LaPack).  I also
experienced with going a little higher level here and there.  Attributes
aren't implemented yet, because that would require making location ids a
type class.  An unsolved problem is the safe representation of ranks: I
went for generality by using lists for indexing, but it would be nice to
express dimensionality constraints in the types (with sane syntax).
Maybe there's a handy technique for this, I didn't explore the field.
Talking about indexing, choosing Fortran convention seems to be a
mistake in retrospect, but that's no big deal.

I attach my code so you can get a better idea what I'm talking about,
maybe you can find some usable pieces.  Separating the generic hid type
into specific newtypes worked out to some extent, but maybe isn't a good
idea at the lowest level (where the FFI makes it automatic).  I'd need
broader experience with the HDF5 API to tell.
-- 
Regards,
Feri.

Attachment: hdf5.tgz
Description: GNU Unix tar archive

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to