Safe Haskell | None |
---|---|
Language | Haskell2010 |
Handles parsing of both infix and RPN Pred
expressions.
Documentation
closeParen :: Token m a Source
Close parentheses
parseExpression :: (Functor m, Monad m) => ExprDesc -> [Token m a] -> Either Error (PredM m a) Source
Parses expressions. Fails if the expression is nonsensical in some way (for example, unbalanced parentheses, parentheses in an RPN expression, or multiple stack values remaining.) Works by first changing infix expressions to RPN ones.