[Haskell-cafe] Storable types

Jules Bean jules at jellybean.co.uk
Thu Dec 20 10:02:52 EST 2007


Clerton Filho wrote:
> Hi,
> 
> I'm newbie in Haskell, and I have some doubts... In this programming 
> language, do we have storable values? Case affirmative, what are the 
> storable types in Haskell, and how can I implement then...

Not entirely sure what you mean.

There is a haskell typeclass called Storable, but it probably isn't what 
you mean.

If you want persistence, serialisation, we have two options:

Read/Show is simple, slow and text-based. It's very helpful for 
debugging but not for high performance.

Data.Binary is fast, configurable and binary. That's a good solution for 
high-throughput persistence.

If you need versioning support, then the upper layer of Binary isn't for 
you. But the "guts" of binary, called Get and Put, make it simple to 
write your own versioned persistence.

Jules


More information about the Haskell-Cafe mailing list