Name: symantic-parser version: 0.0.0.0 synopsis: A Staging Parser description: This is an alternative but incomplete implementation of [ParsleyHaskell](https://github.com/J-mie6/ParsleyHaskell). . Main improvements are: . * Tagless-final and DefaultSignatures are used instead of tagfull-final to handle recursion schemes, this avoids constructing and deconstructing 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 dependant-map by keeping observed sharing inside 'def' and 'ref' combinators, instead of passing by a DependantMap. * No dependency on GHC plugins: lift-plugin and idioms-plugin, because those are plugins hence introduce a bit of complexity in the build process, 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 (yet) and do not feel confortable to maintain them in case their authors abandon them. . Goals are: . * For me to 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 is doable with megaparsec, but is hard and less principled when it comes to optimize, like merging alternatives. * To have unit tests. . TODO: . * Eval instructions * Collect subroutines in a big recursive LetE * Inputable instances * Join points * Errors * Registers license: GPL-3 -- license-file: LICENSE author: Julien Moutinho maintainer: Julien Moutinho bug-reports: Julien Moutinho copyright: Julien Moutinho stability: experimental category: Text extra-source-files: extra-tmp-files: build-type: Simple cabal-version: >=1.10 tested-with: GHC==8.10.2 Library hs-source-dirs: src exposed-modules: Symantic.Univariant.Trans Symantic.Univariant.Letable Symantic.Parser Symantic.Parser.Grammar Symantic.Parser.Grammar.Combinators Symantic.Parser.Grammar.Dump Symantic.Parser.Grammar.Fixity Symantic.Parser.Grammar.ObserveSharing Symantic.Parser.Grammar.Optimize Symantic.Parser.Grammar.Write Symantic.Parser.Machine Symantic.Parser.Machine.Dump Symantic.Parser.Machine.Generate Symantic.Parser.Machine.Input Symantic.Parser.Machine.Instructions Symantic.Parser.Staging other-modules: default-extensions: BangPatterns, DataKinds, FlexibleContexts, FlexibleInstances, GADTs, GeneralizedNewtypeDeriving, LambdaCase, MultiParamTypeClasses, NamedFieldPuns, NoImplicitPrelude, RankNTypes, RecordWildCards, ScopedTypeVariables, TypeApplications, TypeFamilies, TypeOperators build-depends: base >=4.10 && <5, array, bytestring, containers, ghc-prim, hashable, parallel, template-haskell >= 2.15, -- template-haskell >= 2.16, text, transformers, unordered-containers default-language: Haskell2010 ghc-options: -ddump-splices -ddump-to-file -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates Test-Suite symantic-parser-test type: exitcode-stdio-1.0 hs-source-dirs: test main-is: Main.hs other-modules: Golden Golden.Grammar -- Golden.Utils -- Golden.Parsers -- HUnit -- QuickCheck default-language: Haskell2010 default-extensions: FlexibleContexts LambdaCase NamedFieldPuns NoImplicitPrelude RecordWildCards RankNTypes, ScopedTypeVariables TypeApplications TypeFamilies TypeOperators ViewPatterns ghc-options: -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates -fhide-source-paths -freverse-errors -ddump-splices -ddump-to-file build-depends: symantic-parser, base >= 4.10 && < 5, bytestring >= 0.10, containers >= 0.5, deepseq >= 1.4, directory >= 1.3, filepath >= 1.4, hashable >= 1.2.6, process >= 1.6, strict >= 0.4, tasty >= 0.11, tasty-golden >= 2.3, -- tasty-hunit, template-haskell >= 2.15, temporary >= 1.3, text >= 1.2, -- time >= 1.9, transformers >= 0.4, -- QuickCheck >= 2.0, -- tasty-quickcheck, unix >= 2.7, unordered-containers -- Executable symantic-parser -- hs-source-dirs: exe -- main-is: Main.hs -- other-modules: -- default-language: Haskell2010 -- default-extensions: -- LambdaCase -- NamedFieldPuns -- NoImplicitPrelude -- RecordWildCards -- TypeFamilies -- ViewPatterns -- ghc-options: -- -Wall -- -Wincomplete-uni-patterns -- -Wincomplete-record-updates -- -fhide-source-paths -- -threaded -rtsopts -- -freverse-errors -- build-depends: -- symantic-parser, -- base >= 4.10 && < 5, -- bytestring >= 0.10, -- containers >= 0.5, -- deepseq >= 1.4, -- hashable >= 1.2.6, -- text >= 1.2, -- transformers >= 0.4, -- unordered-containers, -- unix