<br><br><div class="gmail_quote">On Mon, Oct 27, 2008 at 11:26 PM, Brandon S. Allbery KF8NH <span dir="ltr"><<a href="mailto:allbery@ece.cmu.edu">allbery@ece.cmu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On 2008 Oct 27, at 23:25, Andrew Sackville-West wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
this raises a question for me, being a bit of a schemer. Is there any<br>
parallel in haskell to the data is code model of the lisp family? For<br>
example, playing around in scheme with a symbolic differentiator, it<br>
is trivial to then evaluate the differentiated s-expression at<br>
arbitrary value by representing the expression, and it's derivative as<br>
a regular scheme expression.<br>
<br>
Is this something that can be done in haskell? My initial impression<br>
is no, that you'd have to parse it as an expression and evaluate it as<br>
you would in regular imperative languages. I'd love to hear otherwise.<br>
</blockquote>
<br>
<br></div>
You get this in a type-safe form with Template Haskell; you can operate on expressions at the AST level.<br>
<br>
</blockquote></div><br>Yeah, but can you do this at run time? I though Template Haskell can only be used at compile time.<br><br>