Re: [Haskell] evaluate function as a string

2004-04-23 Thread Tomasz Zielonka
On Fri, Apr 23, 2004 at 03:32:54AM +0200, Sebastian Sylvan wrote: First you need to parse the expression into a Haskell data type. For this I would recommend Parsec (see Haskell.org). The Haskell data type would be something like data Expr = AtomD Double | AtomI Integer | Add Expr Expr |

Re: [Haskell] evaluate function as a string

2004-04-23 Thread Sebastian Sylvan
Tomasz Zielonka wrote: On Fri, Apr 23, 2004 at 03:32:54AM +0200, Sebastian Sylvan wrote: First you need to parse the expression into a Haskell data type. For this I would recommend Parsec (see Haskell.org). The Haskell data type would be something like data Expr = AtomD Double | AtomI

Re: [Haskell] evaluate function as a string

2004-04-22 Thread Sebastian Sylvan
Ay Joselito wrote: I want to develop an application in which the user enters a mathematical equation, presumably as a string (any arbitrary equation, using any of the standard mathematical operators : +,*,^, etc, and any of the standard functions: sin, exp, etc.). I need to take that string,