Hello,<br><br>I am still playing with template-haskell...<br><br>I wonder, is there any reason why a quasiquoter cannot create haskell statements and declarations in addition to expressions and patterns? Or more generally create any legal Haskell syntax tree.<br>
<br>I.e Suppose I would like to create a quasiquoter for the C language (please, imagine that it could be useful).<br><br>I could write sth such as :<br><br>[$c| <br><br>int a = 6;<br>int b = 7;<br>int c = a +b;<br><br>struct S { int x; int y}<br>
|]<br><br>It could be nice to generate the appropriate haskell code:<br><br>a = 6<br>b= 7<br>c= a + b<br>data S = S {  x::Int; y:Int}<br>etc<br><br>That would allow to really embed any kind of language in a more or less easy way into haskell, provided that code can be translated into legal haskell.<br>
 <br>Is there anything that prevent these features.<br><br>Thank you<br><br>Regards<br><br>J-C<br><br>