úÎáW   Safe-InferedAn  OperatorTable is a list of Operator * lists. The list is ordered in descending E precedence. All operators in one list have the same precedence (but & may have a different associativity). ?This data type specifies operators that work on values of type a. B An operator is either binary infix or unary prefix or postfix. A 7 binary operator has also an associated associativity. EThis data type specifies the associativity of operators: left, right  or none.  buildExpressionParser table term! builds an expression parser for  terms term with operators from table, taking the associativity  and precedence specified in table" into account. Prefix and postfix < operators of the same precedence can only occur once (i.e. --2 is  not allowed if -1 is prefix negate). Prefix and postfix operators 7 of the same precedence associate to the left (i.e. if ++ is  postfix increment, than -2++ equals -1, not -3). The buildExpressionParser" takes care of all the complexity B involved in building expression parser. Here is an example of an D expression parser that handles prefix signs, postfix increment and  basic arithmetic. - expr = buildExpressionParser table term  <?> "expression"   term = parens expr  <|> natural " <?> "simple expression"  2 table = [ [prefix "-" negate, prefix "+" id ] " , [postfix "++" (+1)] F , [binary "*" (*) AssocLeft, binary "/" (div) AssocLeft ] F , [binary "+" (+) AssocLeft, binary "-" (-) AssocLeft ]  ]  K binary name fun assoc = Infix (do{ reservedOp name; return fun }) assoc F prefix name fun = Prefix (do{ reservedOp name; return fun }) G postfix name fun = Postfix (do{ reservedOp name; return fun })        attoparsec-expr-0.1Data.Attoparsec.Expr OperatorTableOperatorPostfixPrefixInfixAssoc AssocRight AssocLeft AssocNonebuildExpressionParser