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

Andrew Sackville-West andrew at swclan.homelinux.org
Wed Oct 29 10:48:59 EDT 2008


On Wed, Oct 29, 2008 at 07:02:46AM -0700, Andrew Sackville-West wrote:
> On Wed, Oct 29, 2008 at 09:27:32AM +0100, Tillmann Rendel wrote:

...
> > Since Haskell features algebraic data types, and a reasonable flexible  
> > syntax, you do not need to do any parsing. Instead, you can write down  
> > the AST of the embedded language directly as part of your Haskell  
> > program. But you have to write an evaluator. With pattern matching, that  
> > is often very easy, though.
> 
> looks like I'm off to read about Template Haskell.

And it looks like:

http://www.haskell.org/tmrwiki/TemplateHaskell#head-96ad34fffdb541d4e334edeec77d71061beb2ec8

is a pretty good starting point. To write a symbolic differentiator in
haskell, with evaluable results, this looks to be the way to start.

A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/beginners/attachments/20081029/6b0af174/attachment.bin


More information about the Beginners mailing list