[Haskell] ANN: ParserFunction-0.0.5

Enzo Fabrizio ehaussecker at gmail.com
Sun Sep 25 23:20:04 CEST 2011

Dear Haskellers,

I am pleased to announce the latest release of ParserFunction.

ParserFunction provides utilities for parsing and evaluating
mathematical expressions. The central parsing function in this package
is stringToExpr, which parses an expression (as a string) and returns
an expression tree of type Expr (or nothing if the string is
malformed). Example:

> stringToExpr "cos(x^2)+4*(1+y)"
Just (Add (Cos (Pow (Var 'x') (Num 2.0))) (Mul (Num 4.0) (Add (Num
1.0) (Var 'y'))))

Expressions can be evaluated using the function evaluateExpression. Example:

> evaluateExpression "1+1" []
> evaluateExpression "exp(x)" [('x',1)]
> evaluateExpression "sin(arctan(x))*sqrt(y)" [('x',1),('y',2)]

More information can be found by viewing the source code on Hackage.


The functionality of this package provides the primary framework for
several Haskell-based web applications found at

Comments and questions regarding this package or its implementation in
web programming are welcomed.


Enzo Haussecker
University of California, San Diego
Applied Mathematics Major
Email: enzo [at] ucsd [dot] edu

More information about the Haskell mailing list