]> Git — Sourcephile - haskell/symantic-parser.git/blob - symantic-parser.cabal
bump to ghc-9.0.1 to get a levity-polymorphic CodeQ
[haskell/symantic-parser.git] / symantic-parser.cabal
1 Name: symantic-parser
2 version: 0.0.0.0
3 synopsis: A Staging Parser
4 description:
5 This is an alternative but incomplete implementation of [ParsleyHaskell](https://github.com/J-mie6/ParsleyHaskell).
6 .
7 Main improvements are:
8 .
9 * Tagless-final and DefaultSignaturesa are used
10 instead of tagfull-final to handle recursion schemes,
11 this avoids constructing and deconstructing tags when transforming
12 combinators or instructions.
13 And structures/simplifies the code by avoiding to define
14 custom traversals (traverseCombinator)
15 or custom fix-point data-types (Fix4)
16 and associated utilities (cata4) when introducing new index-types.
17 Note that the extensibility of combinators, a great feature of tagless-final,
18 is not really achievable when using the optimizing pass
19 which requires a comprehensive initial encoding.
20 * No dependency on dependant-map by keeping observed sharing
21 inside 'def' and 'ref' combinators, instead of passing by a DependantMap.
22 * No dependency on GHC plugins: lift-plugin and idioms-plugin,
23 because those are plugins hence introduce a bit of complexity
24 in the build process, but most importantly they are experimental
25 and only cosmetic, since they only enable a cleaner usage
26 of the parsing combinators, by lifting Haskell code in 'pure'
27 to integrate the TemplateHaskell needed.
28 I do not understand them (yet) and do not feel confortable
29 to maintain them in case their authors abandon them.
30 .
31 Goals are:
32 .
33 * For me to understand ParsleyHaskell, and find a manageable balance
34 between simplicity of the codebase and features of the parser.
35 * To support parsing tree-like data structures (like XML or HTTP routes)
36 instead of just string-like data structures,
37 which is doable with megaparsec, but is hard and less principled
38 when it comes to optimize, like merging alternatives.
39 * To have unit tests.
40 .
41 TODO:
42 .
43 * Eval instructions
44 * Collect subroutines in a big recursive LetE
45 * Inputable instances
46 * Join points
47 * Errors
48 * Registers
49 license: GPL-3
50 -- license-file: LICENSE
51 author: Julien Moutinho <julm+symantic-parser@sourcephile.fr>
52 maintainer: Julien Moutinho <julm+symantic-parser@sourcephile.fr>
53 bug-reports: Julien Moutinho <julm+symantic-parser@sourcephile.fr>
54 copyright: Julien Moutinho <julm+symantic-parser@sourcephile.fr>
55 stability: experimental
56 category: Text
57 extra-source-files:
58 extra-tmp-files:
59 build-type: Simple
60 cabal-version: >=1.10
61 tested-with: GHC==8.10.2
62
63 Library
64 hs-source-dirs: src
65 exposed-modules:
66 Symantic.Univariant.Trans
67 Symantic.Univariant.Letable
68 Symantic.Parser
69 Symantic.Parser.Automaton
70 Symantic.Parser.Automaton.Dump
71 Symantic.Parser.Automaton.Instructions
72 Symantic.Parser.Grammar
73 Symantic.Parser.Grammar.Combinators
74 Symantic.Parser.Grammar.Dump
75 Symantic.Parser.Grammar.Fixity
76 Symantic.Parser.Grammar.ObserveSharing
77 Symantic.Parser.Grammar.Optimize
78 Symantic.Parser.Grammar.Write
79 Symantic.Parser.Staging
80 other-modules:
81 default-extensions:
82 BangPatterns,
83 DataKinds,
84 FlexibleContexts,
85 FlexibleInstances,
86 GADTs,
87 GeneralizedNewtypeDeriving,
88 LambdaCase,
89 MultiParamTypeClasses,
90 NamedFieldPuns,
91 NoImplicitPrelude,
92 RankNTypes,
93 RecordWildCards,
94 ScopedTypeVariables,
95 TypeApplications,
96 TypeFamilies,
97 TypeOperators
98 build-depends:
99 base >=4.10 && <5,
100 array,
101 bytestring,
102 containers,
103 ghc-prim,
104 hashable,
105 parallel,
106 template-haskell >= 2.15,
107 -- template-haskell >= 2.16,
108 text,
109 transformers,
110 unordered-containers
111 default-language: Haskell2010
112 ghc-options:
113 -ddump-splices
114 -ddump-to-file
115 -Wall
116 -Wincomplete-uni-patterns
117 -Wincomplete-record-updates
118
119 Test-Suite symantic-parser-test
120 type: exitcode-stdio-1.0
121 hs-source-dirs: test
122 main-is: Main.hs
123 other-modules:
124 Golden
125 Golden.Grammar
126 -- HUnit
127 -- QuickCheck
128 default-language: Haskell2010
129 default-extensions:
130 FlexibleContexts
131 LambdaCase
132 NamedFieldPuns
133 NoImplicitPrelude
134 RecordWildCards
135 RankNTypes,
136 ScopedTypeVariables
137 TypeApplications
138 TypeFamilies
139 TypeOperators
140 ViewPatterns
141 ghc-options:
142 -Wall
143 -Wincomplete-uni-patterns
144 -Wincomplete-record-updates
145 -fhide-source-paths
146 -freverse-errors
147 build-depends:
148 symantic-parser,
149 base >= 4.10 && < 5,
150 bytestring >= 0.10,
151 containers >= 0.5,
152 deepseq >= 1.4,
153 hashable >= 1.2.6,
154 tasty >= 0.11,
155 tasty-golden >= 2.3,
156 -- tasty-hunit,
157 template-haskell >= 2.15,
158 text >= 1.2,
159 -- time >= 1.9,
160 transformers >= 0.4,
161 -- QuickCheck >= 2.0,
162 -- tasty-quickcheck,
163 unordered-containers
164
165 -- Executable symantic-parser
166 -- hs-source-dirs: exe
167 -- main-is: Main.hs
168 -- other-modules:
169 -- default-language: Haskell2010
170 -- default-extensions:
171 -- LambdaCase
172 -- NamedFieldPuns
173 -- NoImplicitPrelude
174 -- RecordWildCards
175 -- TypeFamilies
176 -- ViewPatterns
177 -- ghc-options:
178 -- -Wall
179 -- -Wincomplete-uni-patterns
180 -- -Wincomplete-record-updates
181 -- -fhide-source-paths
182 -- -threaded -rtsopts
183 -- -freverse-errors
184 -- build-depends:
185 -- symantic-parser,
186 -- base >= 4.10 && < 5,
187 -- bytestring >= 0.10,
188 -- containers >= 0.5,
189 -- deepseq >= 1.4,
190 -- hashable >= 1.2.6,
191 -- text >= 1.2,
192 -- transformers >= 0.4,
193 -- unordered-containers,
194 -- unix