]> Git — Sourcephile - haskell/symantic-parser.git/blob - ReadMe.md
machine: rename InstrPure{Haskell => }
[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, a great feature of tagless-final, is not really achievable when using the optimizing pass which requires a comprehensive initial encoding.
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 - License is `GPL-3.0-or-later` not `BSD-3-Clause`.
14
15 ### Main goals
16
17 - For me to better understand `ParsleyHaskell`, and find a manageable balance between simplicity of the codebase and features of the parser.
18
19 - 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.