Hi Dmitry,<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Well, great thanks for interesting links. </div>

<div><div><br></div><div>But definitely at first I need a time to try to understand what Generic Haskell and EMGM are.</div><div></div></div></blockquote><div><br>Generic Haskell (GH) is a language extension implementing datatype-generic programming features on top of Haskell. It is implemented using a preprocessor that compiles source to Haskell.<br>

<br>EMGM (&quot;Extensible and Modular Generics for the Masses&quot;) is an example of a Haskell library that allows you to implement many of the GH functions directly in Haskell without a preprocessor.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div><div>Does it stronger than Template Haskell? Could it be explained briefly and simplistic for first impression? Could it be compared with SYB or TH?</div>
<div></div></div></blockquote><div><br>Template Haskell is a syntax-based metaprogramming extension to Haskell. Many datatype-generic things can be done in TH, but it often takes a lot of work because you&#39;re generating syntax. EMGM actually uses TH to generate representation values of datatypes.<br>

<br>SYB is another example of a datatype-generic library. It uses a different representation of datatypes than EMGM and GH. As a result, the libraries support different kinds of functions (sometimes completely different, but sometimes the same and implemented differently).<br>

 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div>Would it be applied to realisation of translation or to target Haskell code? <br>

</div></div></blockquote></div><br>To use something like EMGM or SYB, one uses or develops functions for manipulating values of arbitrary datatypes. Think of what happens when you &quot;derive (Eq, Read, Show)&quot; for example. You are getting functions (==), read, and show that work for your datatype. You can do this same sort of thing with other functions in SYB and EMGM.<br>

<br>As for your use case, I don&#39;t know if one of the libraries can help you directly. You wanted to first get the datatypes from XML Schemas, and that&#39;s going to require something like HaXml. But once you do get those datatypes, you can use one of the many generic programming libraries to manipulate values without having to write your own functions.<br>

<br>For a tutorial on using EMGM and SYB, see our recently published tech. report:<br><br>Libraries for Generic Programming in Haskell<br>Johan Jeuring, Sean Leather, José Pedro Magalhães, and Alexey Rodriguez Yakushev<br>

<a href="http://www.cs.uu.nl/research/techreps/UU-CS-2008-025.html">http://www.cs.uu.nl/research/techreps/UU-CS-2008-025.html</a><br><br>Sean<br>