λ> parseAST "(&& X Y)"
Right (AST {name = "&&", children = [AST {name = "X", children = []},AST {name = "Y", children = []}]})
λ> parseAST "(AND X Y)"
Left (line 1, column 5):
unexpected "X"
expecting )
λ> parseAST "((AND) X Y)"
Right (AST {name = "AND", children = [AST {name = "X", children = []},AST {name = "Y", children = []}]})
Consider the following three cases