ParserFunction-0.0.6: Utilities for parsing and evaluating mathematical expressions.

Safe HaskellSafe-Infered

Text.ParserCombinators.Parsec.ParserFunction

Synopsis

Documentation

data Expr Source

The Expr data type provides a basis for ordering mathematical operations.

Instances

evaluateExpression :: String -> [(Char, Double)] -> DoubleSource

evaluateExpression evaluates a mathematical expression s using the variable map m.

stringToExpr :: String -> Maybe ExprSource

stringToExpr parses an expression and returns an expression tree of type Expr.

evaluate :: Map String Double -> Expr -> DoubleSource

evaluate takes a map and expression tree to produce a numerical value.