How to save a haskell data structure in C?