<div dir="ltr">Hi All<div><br></div><div>I want to integrate Haskell into an existing C# project, initially by creating one C# class that basically does all it's "work" in Haskell (and just provides a C# interface).</div><div><br></div><div>There will be a few types passed in and out of this Haskell module from/to C#. On the C# side, there are classes with members, who's types are probably going to be either Strings, Ints, or lists of Strings/Ints, or lists of other objects.</div><div><br></div><div>I'd like to have the same types on the Haskell side.</div><div><br></div><div>It would be nice if I could just magically pass one of these C# types to Haskell and on the Haskell side it will appear as a Haskell type</div><div><br></div><div>I assume what I'll have to do is serialise the type on the C# side and deserialise on the Haskell side.</div><div><br></div><div>C# allows one to serialise any data type to XML. Haskell has plenty of serialisation libraries as well.</div><div><br>However, the problem I presume is that if I just serialise to XML on the C# side, and deserialise from XML on the Haskell side, if my types are just slightly different, or even if the exact serialisers/deserialises represent their data in different ways, it isn't going to work. </div><div><br></div><div>It seems like passing complex data to/from Haskell may be a common problem other people experience, so I'm looking for any suggestions on a clean way of doing this.</div></div>