JavaScript -> Haskell marshalling