Fixed marshaling / struct conversion from C to Haskell
Added C test program that demonstrates usage.