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