prednote-0.36.0.4: Evaluate and display trees of predicates

Safe HaskellNone
LanguageHaskell2010

Prednote.Expressions.Infix

Synopsis

Documentation

data InfixToken f a Source

Constructors

TokRPN (RPNToken f a) 
TokParen Paren 

data Paren Source

Constructors

Open 
Close 

createRPN Source

Arguments

:: Foldable f 
=> f (InfixToken m a)

The input tokens, with the beginning of the expression on the left side of the sequence.

-> Maybe [RPNToken m a]

The output sequence of tokens, with the beginning of the expression on the left side of the list.

Creates an RPN expression from an infix one. Fails only if there are mismatched parentheses. It is possible to create a nonsensical RPN expression; the RPN parser must catch this.