@hackage symantic-parser0.0.0.20210101
Parser combinators statically optimized and staged via typed meta-programming
Categories
License
GPL-3.0-or-later
Maintainer
Julien Moutinho <julm+symantic-parser@sourcephile.fr>
Links
Versions
- 0.2.1.20210803 Tue, 31 Aug 2021
- 0.2.0.20210703 Sun, 11 Jul 2021
- 0.1.0.20210201 Mon, 1 Feb 2021
- 0.0.0.20210102 Sat, 2 Jan 2021
- 0.0.0.20210101 Fri, 1 Jan 2021
Installation
Dependencies (10)
- array
- base >=4.10 && <5
- bytestring
- containers
- ghc-prim
- template-haskell >=2.16 Show all…
Dependents (0)
Package Flags
dump-core
(off by default)
Dump GHC's Core in HTML
dump-splices
(off by default)
Dump code generated by Template Haskell
Main differences with respect to ParsleyHaskell
-
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. 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. 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. -
No dependency on
dependent-map
by keeping observed sharing insidedef
andref
combinators, instead of passing by aDMap
. Same for join-points, whereTemplateHaskell
names are also directly used instead of passing by aDMap
. -
No dependency on GHC plugins:
lift-plugin
andidioms-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 inpure
to integrate theTemplateHaskell
needed. I do not understand them that much and do not feel confortable to maintain them in case their authors abandon them. -
Error messages based upon the farthest input position reached (not yet implemented in
ParsleyHaskell
). -
License is
GPL-3.0-or-later
notBSD-3-Clause
.
Main goals
-
For me to better understand
ParsleyHaskell
, and find a manageable balance between simplicity of the codebase and features of the parser. -
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.