I want to extend an toy functional programming language to accept Haskell-like infix operators. Here are the characteristics I am interested in:
- Parser dynamically updates itself to accept newly defined operators.
- Infix operators can be converted to functions surrounding them in parenthesis.
- Functions can be converted to infix operators surrounding them in graves.
- Function calls with Haskell syntax (optional parenthesis with space separated arguments).
Is there any existing library that implements it?
My current parser is written in Megaparsec so i will appreciate a solution compatible with it.