Folks,

I'm trying to parse NumExpr > NumExpr (example) which should return a logical expression while parsing numeric terms. I can't figure out how to make buildExpressionParser do this for me since it takes the type of the term parser given to it. If I supply a parser for numeric terms then I cannot return a logical expression.

How can this be resolved?

Note that I do not want to put all expressions into the same Expr type since it makes generating valid random ASTs with QuickCheck impossible.

        Thanks, Joel

--
http://wagerlabs.com/





_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to