[Haskell-beginners] evaluation of expressions [was Re: eval command?]

Tony Hannan tonyhannan2 at gmail.com
Tue Oct 28 19:00:00 EDT 2008


On Mon, Oct 27, 2008 at 11:26 PM, Brandon S. Allbery KF8NH <
allbery at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20081028/0e38537e/attachment.htm


More information about the Beginners mailing list