]> Git — Sourcephile - haskell/symantic-parser.git/blob - symantic-parser.cabal
iface: update release `version`
[haskell/symantic-parser.git] / symantic-parser.cabal
1 cabal-version: 3.0
2 name: symantic-parser
3 maintainer: mailto:~julm/symantic-parser@todo.code.sourcephile.fr
4 bug-reports: https://todo.code.sourcephile.fr/~julm/symantic-parser
5 homepage: https://git.code.sourcephile.fr/~julm/symantic-parser
6 author: Julien Moutinho <julm+symantic-parser@sourcephile.fr>
7 copyright: Julien Moutinho <julm+symantic-parser@sourcephile.fr>
8 license: AGPL-3.0-or-later
9 license-file: LICENSES/AGPL-3.0-or-later.txt
10 version: 0.2.2.20211008
11 stability: experimental
12 synopsis: Parser combinators statically optimized and staged via typed meta-programming
13 description:
14 This is a work-in-progress experimental library to generate parsers,
15 leveraging Tagless-Final interpreters and Typed Template Haskell staging.
16
17 This is an alternative but less powerful/reviewed
18 implementation of [ParsleyHaskell](https://github.com/J-mie6/ParsleyHaskell).
19 See the paper by Jamie Willis, Nicolas Wu, and Matthew Pickering,
20 admirably well presented at ICFP-2020: [Staged Selective Parser Combinators](https://icfp20.sigplan.org/details/icfp-2020-papers/20/Staged-Selective-Parser-Combinators).
21 category: Parsing
22 build-type: Simple
23 tested-with: GHC==9.0.1
24 extra-doc-files:
25 ChangeLog.md
26 Hacking.md
27 ReadMe.md
28 ToDo.md
29 extra-source-files:
30 cabal.project
31 default.nix
32 .envrc
33 flake.lock
34 flake.nix
35 Makefile
36 parsers/Parsers/Brainfuck/inputs/*.bf
37 shell.nix
38 tests/Golden/**/*.txt
39 extra-tmp-files:
40
41 source-repository head
42 type: git
43 location: https://git.code.sourcephile.fr/~julm/symantic-parser
44
45 flag dump-core
46 description: Dump GHC's Core in HTML
47 manual: True
48 default: False
49
50 flag disable-ormolu-check
51 description: Remove ormolu from build-tool-depends.
52 Temporary hack while Nixpkgs' haskellPackages.ormolu remains broken.
53 manual: True
54 default: False
55
56 common boilerplate
57 default-language: Haskell2010
58 default-extensions:
59 NoImplicitPrelude
60 ghc-options:
61 -Wall
62 -Wincomplete-uni-patterns
63 -Wincomplete-record-updates
64 -Wpartial-fields
65 -fprint-potential-instances
66
67 library
68 import: boilerplate
69 hs-source-dirs: src
70 exposed-modules:
71 Language.Haskell.TH.HideName
72 Language.Haskell.TH.Show
73 Symantic.Parser
74 Symantic.Parser.Grammar
75 Symantic.Parser.Grammar.Combinators
76 Symantic.Parser.Grammar.ObserveSharing
77 Symantic.Parser.Grammar.Optimize
78 Symantic.Parser.Grammar.Production
79 Symantic.Parser.Grammar.View
80 Symantic.Parser.Grammar.Write
81 Symantic.Parser.Machine
82 Symantic.Parser.Machine.Generate
83 Symantic.Parser.Machine.Input
84 Symantic.Parser.Machine.Instructions
85 Symantic.Parser.Machine.Optimize
86 Symantic.Parser.Machine.Program
87 Symantic.Parser.Machine.View
88 default-extensions:
89 BangPatterns,
90 DataKinds,
91 FlexibleContexts,
92 FlexibleInstances,
93 GADTs,
94 GeneralizedNewtypeDeriving,
95 LambdaCase,
96 MultiParamTypeClasses,
97 NamedFieldPuns,
98 RankNTypes,
99 RecordWildCards,
100 ScopedTypeVariables,
101 TypeApplications,
102 TypeFamilies,
103 TypeOperators
104 build-depends:
105 base >=4.10 && <5,
106 array,
107 bytestring,
108 containers,
109 deepseq >= 1.4,
110 ghc-prim,
111 hashable,
112 -- For Language.Haskell.Ppr.Lib.pprExp
113 pretty >= 1.1,
114 symantic-base >= 0.2,
115 template-haskell >= 2.16,
116 text,
117 transformers,
118 unordered-containers
119
120 library parsers
121 -- visibility: public
122 import: boilerplate
123 hs-source-dirs: parsers
124 exposed-modules:
125 Parsers.Brainfuck.Attoparsec
126 Parsers.Brainfuck.Handrolled
127 Parsers.Brainfuck.SymanticParser
128 Parsers.Brainfuck.SymanticParser.Grammar
129 Parsers.Brainfuck.Types
130 Parsers.Nandlang
131 Parsers.Playground
132 Parsers.Utils
133 Parsers.Utils.Handrolled
134 Parsers.Utils.Attoparsec
135 Parsers.Utils.Attoparsec.Text
136 default-extensions:
137 BangPatterns,
138 DefaultSignatures,
139 FlexibleContexts,
140 FlexibleInstances,
141 GeneralizedNewtypeDeriving,
142 LambdaCase,
143 MultiParamTypeClasses,
144 ScopedTypeVariables,
145 TypeApplications,
146 TypeFamilies,
147 TypeOperators
148 build-depends:
149 symantic-parser,
150 attoparsec >= 0.13,
151 base >= 4.10 && < 5,
152 bytestring >= 0.10,
153 containers >= 0.5.10.1,
154 deepseq >= 1.4,
155 directory >= 1.3,
156 filepath >= 1.4,
157 ghc-prim,
158 hashable >= 1.2.6,
159 megaparsec >= 9.0,
160 process >= 1.6,
161 strict >= 0.4,
162 symantic-base >= 0.2,
163 tasty >= 0.11,
164 tasty-golden >= 2.3,
165 template-haskell >= 2.16,
166 text >= 1.2,
167 transformers >= 0.4,
168 unix >= 2.7,
169 unordered-containers
170 -- ghc-options: -ddump-splices
171
172 test-suite symantic-parser-tests
173 import: boilerplate
174 type: exitcode-stdio-1.0
175 hs-source-dirs: tests
176 main-is: Main.hs
177 other-modules:
178 Golden
179 Golden.Grammar
180 Golden.Machine
181 Golden.Parser
182 Golden.Splice
183 Golden.Utils
184 Grammar
185 -- HUnit
186 -- QuickCheck
187 Paths_symantic_parser
188 autogen-modules:
189 Paths_symantic_parser
190 ghc-prof-options: -fexternal-interpreter
191 build-depends:
192 symantic-parser,
193 symantic-parser:parsers,
194 base >= 4.10 && < 5,
195 bytestring >= 0.10,
196 -- Needed for exported Data.Map.Internal
197 containers >= 0.5.10.1,
198 deepseq >= 1.4,
199 directory >= 1.3,
200 filepath >= 1.4,
201 hashable >= 1.2.6,
202 process >= 1.6,
203 strict >= 0.4,
204 tasty >= 0.11,
205 tasty-golden >= 2.3,
206 -- tasty-hunit,
207 template-haskell >= 2.16,
208 -- th-lift-instances >= 0.1.17,
209 -- temporary >= 1.3,
210 text >= 1.2,
211 -- time >= 1.9,
212 transformers >= 0.4,
213 -- QuickCheck >= 2.0,
214 -- tasty-quickcheck,
215 unix >= 2.7,
216 unordered-containers
217 if !flag(disable-ormolu-check)
218 build-tool-depends:
219 ormolu:ormolu >= 1.5
220 if flag(dump-core)
221 build-depends: dump-core
222 ghc-options: -fplugin=DumpCore
223
224 benchmark symantic-parser-benchmark
225 import: boilerplate
226 type: exitcode-stdio-1.0
227 hs-source-dirs: benchmarks
228 main-is: Main.hs
229 default-language: Haskell2010
230 other-modules:
231 Brainfuck
232 Paths_symantic_parser
233 autogen-modules:
234 Paths_symantic_parser
235 default-extensions:
236 ghc-options: -fno-enable-th-splice-warnings
237 ghc-prof-options: -fexternal-interpreter
238 build-depends:
239 base >= 4.6 && < 5,
240 symantic-parser,
241 symantic-parser:parsers,
242 attoparsec >= 0.13,
243 bytestring >= 0.10,
244 containers >= 0.5,
245 criterion >= 1.5,
246 deepseq >= 1.4,
247 megaparsec >= 9.0,
248 random >= 1.1,
249 text >= 1.2,
250 template-haskell >= 2.16,
251 transformers >= 0.5