Data.Algebra.Boolean
Description
Boolean expressions implemented using naive trees
type Parser = Parsec Void Text Source #
type CTX = Map Text Bool Source #
Context. Every variable not in context will be treated as False.
data Expr Source #
Defined in Data.Algebra.Boolean
Methods
(==) :: Expr -> Expr -> Bool #
(/=) :: Expr -> Expr -> Bool #
showsPrec :: Int -> Expr -> ShowS #
show :: Expr -> String #
showList :: [Expr] -> ShowS #
eval :: CTX -> Expr -> Bool Source #
Evaluate an expression in a context.
expr :: Parser Expr Source #
Parse an expression