ShEx implementation used a hand-made backtracking monad with error messages.
Some problems of that approach:
In case of errors, the system only showed one error. However, the validation result should show a list of errors.
The performance of the backtracking monad was not checked and it is possible that there are other optimizations.
I would like to use a more standard approach instead of defining my own monad which may contain errors. There are some libraries like scalaz or cats that already contain laws and seem to fit better for this task
ShEx implementation used a hand-made backtracking monad with error messages.
Some problems of that approach: