I'm working on a project in which I am attempting to write a parser for Haskell within Haskell itself using Parsec.
The parser itself only deals with a subset of the features of the full Haskell implementation but I'm having difficulty figuring out how to implement the grammar with precedence of operations for example boolean expression involving && over || and also 'if then else" statements in relation to other operations.
I'm attempting to do this with the Text.Parsec.Expr module more specifically BuildExpressionParser combinator using table and term as used in a number of tutorials I have seen which deal with arithmetic expression. Is this the correct course of action? Or will it fail to meet my needs.
Will it be necessary to create an AST for the grammar by creating new data types as outlined in the following tutorial?
Also what's the difference between the modules:
Text.Parsec.Expr
Text.ParserCombinators.Parsec.Expr
Thanks in advance,
Seán