Stuff for haskell bindings