]> Git — Sourcephile - haskell/symantic-parser.git/blob - ReadMe.md
doc: update the ReadMe and ChangeLog
[haskell/symantic-parser.git] / ReadMe.md
1 ### Main differences with respect to `ParsleyHaskell`
2
3 - Tagless-final and `DefaultSignatures` are used instead of tagfull-final to handle recursion schemes, this avoids constructing and deconstructing as much tags when transforming combinators or instructions.
4 And structures/simplifies the code by avoiding to define custom traversals (`traverseCombinator`) or custom fix-point data-types (`Fix4`) and associated utilities (`cata4`) when introducing new index-types.
5 Note that the extensibility of combinators outside this library, a great feature of tagless-final, is still possible because the initial encoding used by the optimization pass is kept open using a `data family`.
6
7 - No dependency on `dependent-map` by keeping observed sharing inside `def` and `ref` combinators, instead of passing by a `DMap`. Same for join-points, where `TemplateHaskell` names are also directly used instead of passing by a `DMap`.
8
9 - No dependency on GHC plugins: `lift-plugin` and `idioms-plugin`, because those are plugins hence introduce a bit of complexity in the build processes using this parser, but most importantly they are experimental and only cosmetic, since they only enable a cleaner usage of the parsing combinators, by lifting Haskell code in `pure` to integrate the `TemplateHaskell` needed. I do not understand them that much and do not feel confortable to maintain them in case their authors abandon them.
10
11 - Error messages based upon the farthest input position reached (not yet implemented in `ParsleyHaskell`).
12
13 - Minimal input length checks ("horizon" checks) required for a successful parsing are factorized using a different static analysis than `ParsleyHaskell`'s "piggy bank" which I've not understood well. This analyis can see beyond calls to subroutines, but maybe `ParsleyHaskell`'s analysis can also be adjusted to do the same. Both analysis are not well documented and studied.
14
15 - License is `GPL-3.0-or-later` not `BSD-3-Clause`.
16
17 ### Main goals
18
19 - For me to better understand `ParsleyHaskell`, and find a manageable balance between simplicity of the codebase and features of the parser.
20
21 - To support parsing tree-like data structures (like XML or HTTP routes) instead of just string-like data structures, which I've done using `megaparsec`, but it is not conceived for such input, and is less principled when it comes to optimizing, like merging alternatives.