Hello,<div><br></div><div>I see no real reason to use the second approach, unless you&#39;re doing something tremendously new and big. Besides, the first solution is much easier and will be easier to maintain (in case the back end changes).</div>

<div><br></div><div>Kind regards,</div><div>Jasper Van der Jeugt<br><br><div class="gmail_quote">On Mon, Jan 4, 2010 at 6:14 PM, CK Kashyap <span dir="ltr">&lt;<a href="mailto:ck_kashyap@yahoo.com">ck_kashyap@yahoo.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br>
I am not sure if I&#39;m using DSL in the right context here but I am referring to those solutions that allow us to write code in Haskell and generate a target code source code of another language or even object code for that matter. I am aware of two ways of achieving this -<br>


1. Implement functions that emit the target code - that is, when the Haskell code is compiled and run, the target code is emitted<br>
2. Modify the Haskell compiler&#39;s back end to emit the code - that is when the Haskell code is compiled the target code is emitted<br>
<br>
I am not sure if there are more ways (hybrid perhaps) ...<br>
<br>
My question is,  when would I chose one approach over the other?<br>
<br>
Regards,<br>
Kashyap<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br></div>