]> Git — Sourcephile - haskell/symantic-parser.git/blob - symantic-parser.cabal
build: move all Nix config to `flake.nix`
[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 .envrc
32 flake.lock
33 flake.nix
34 Makefile
35 parsers/Parsers/Brainfuck/inputs/*.bf
36 tests/Golden/**/*.txt
37 extra-tmp-files:
38
39 source-repository head
40 type: git
41 location: https://git.code.sourcephile.fr/~julm/symantic-parser
42
43 flag dump-core
44 description: Dump GHC's Core in HTML
45 manual: True
46 default: False
47
48 flag disable-ormolu-check
49 description: Remove ormolu from build-tool-depends.
50 Temporary hack while Nixpkgs' haskellPackages.ormolu remains broken.
51 manual: True
52 default: False
53
54 common boilerplate
55 default-language: Haskell2010
56 default-extensions:
57 NoImplicitPrelude
58 ghc-options:
59 -Wall
60 -Wincomplete-uni-patterns
61 -Wincomplete-record-updates
62 -Wpartial-fields
63 -fprint-potential-instances
64
65 library
66 import: boilerplate
67 hs-source-dirs: src
68 exposed-modules:
69 Language.Haskell.TH.HideName
70 Language.Haskell.TH.Show
71 Symantic.Parser
72 Symantic.Parser.Grammar
73 Symantic.Parser.Grammar.Combinators
74 Symantic.Parser.Grammar.ObserveSharing
75 Symantic.Parser.Grammar.Optimize
76 Symantic.Parser.Grammar.Production
77 Symantic.Parser.Grammar.View
78 Symantic.Parser.Grammar.Write
79 Symantic.Parser.Machine
80 Symantic.Parser.Machine.Generate
81 Symantic.Parser.Machine.Input
82 Symantic.Parser.Machine.Instructions
83 Symantic.Parser.Machine.Optimize
84 Symantic.Parser.Machine.Program
85 Symantic.Parser.Machine.View
86 default-extensions:
87 BangPatterns,
88 DataKinds,
89 FlexibleContexts,
90 FlexibleInstances,
91 GADTs,
92 GeneralizedNewtypeDeriving,
93 LambdaCase,
94 MultiParamTypeClasses,
95 NamedFieldPuns,
96 RankNTypes,
97 RecordWildCards,
98 ScopedTypeVariables,
99 TypeApplications,
100 TypeFamilies,
101 TypeOperators
102 build-depends:
103 base >=4.10 && <5,
104 array,
105 bytestring,
106 containers,
107 deepseq >= 1.4,
108 ghc-prim,
109 hashable,
110 -- For Language.Haskell.Ppr.Lib.pprExp
111 pretty >= 1.1,
112 symantic-base >= 0.3,
113 template-haskell >= 2.16,
114 text,
115 transformers,
116 unordered-containers
117
118 library parsers
119 -- visibility: public
120 import: boilerplate
121 hs-source-dirs: parsers
122 exposed-modules:
123 Parsers.Brainfuck.Attoparsec
124 Parsers.Brainfuck.Handrolled
125 Parsers.Brainfuck.SymanticParser
126 Parsers.Brainfuck.SymanticParser.Grammar
127 Parsers.Brainfuck.Types
128 Parsers.Nandlang
129 Parsers.Playground
130 Parsers.Utils
131 Parsers.Utils.Handrolled
132 Parsers.Utils.Attoparsec
133 Parsers.Utils.Attoparsec.Text
134 default-extensions:
135 BangPatterns,
136 DefaultSignatures,
137 FlexibleContexts,
138 FlexibleInstances,
139 GeneralizedNewtypeDeriving,
140 LambdaCase,
141 MultiParamTypeClasses,
142 ScopedTypeVariables,
143 TypeApplications,
144 TypeFamilies,
145 TypeOperators
146 build-depends:
147 symantic-parser,
148 attoparsec >= 0.13,
149 base >= 4.10 && < 5,
150 bytestring >= 0.10,
151 containers >= 0.5.10.1,
152 deepseq >= 1.4,
153 directory >= 1.3,
154 filepath >= 1.4,
155 ghc-prim,
156 hashable >= 1.2.6,
157 megaparsec >= 9.0,
158 process >= 1.6,
159 strict >= 0.4,
160 symantic-base >= 0.3,
161 tasty >= 0.11,
162 tasty-golden >= 2.3,
163 template-haskell >= 2.16,
164 text >= 1.2,
165 transformers >= 0.4,
166 unix >= 2.7,
167 unordered-containers
168 -- ghc-options: -ddump-splices
169
170 test-suite symantic-parser-tests
171 import: boilerplate
172 type: exitcode-stdio-1.0
173 hs-source-dirs: tests
174 main-is: Main.hs
175 other-modules:
176 Golden
177 Golden.Grammar
178 Golden.Machine
179 Golden.Parser
180 Golden.Splice
181 Golden.Utils
182 Grammar
183 -- HUnit
184 -- QuickCheck
185 Paths_symantic_parser
186 autogen-modules:
187 Paths_symantic_parser
188 ghc-prof-options: -fexternal-interpreter
189 build-depends:
190 symantic-parser,
191 symantic-parser:parsers,
192 base >= 4.10 && < 5,
193 bytestring >= 0.10,
194 -- Needed for exported Data.Map.Internal
195 containers >= 0.5.10.1,
196 deepseq >= 1.4,
197 directory >= 1.3,
198 filepath >= 1.4,
199 hashable >= 1.2.6,
200 process >= 1.6,
201 strict >= 0.4,
202 tasty >= 0.11,
203 tasty-golden >= 2.3,
204 -- tasty-hunit,
205 template-haskell >= 2.16,
206 -- th-lift-instances >= 0.1.17,
207 -- temporary >= 1.3,
208 text >= 1.2,
209 -- time >= 1.9,
210 transformers >= 0.4,
211 -- QuickCheck >= 2.0,
212 -- tasty-quickcheck,
213 unix >= 2.7,
214 unordered-containers
215 if !flag(disable-ormolu-check)
216 build-tool-depends:
217 ormolu:ormolu >= 1.5
218 if flag(dump-core)
219 build-depends: dump-core
220 ghc-options: -fplugin=DumpCore
221
222 benchmark symantic-parser-benchmark
223 import: boilerplate
224 type: exitcode-stdio-1.0
225 hs-source-dirs: benchmarks
226 main-is: Main.hs
227 default-language: Haskell2010
228 other-modules:
229 Brainfuck
230 Paths_symantic_parser
231 autogen-modules:
232 Paths_symantic_parser
233 default-extensions:
234 ghc-options: -fno-enable-th-splice-warnings
235 ghc-prof-options: -fexternal-interpreter
236 build-depends:
237 base >= 4.6 && < 5,
238 symantic-parser,
239 symantic-parser:parsers,
240 attoparsec >= 0.13,
241 bytestring >= 0.10,
242 containers >= 0.5,
243 criterion >= 1.5,
244 deepseq >= 1.4,
245 megaparsec >= 9.0,
246 random >= 1.1,
247 text >= 1.2,
248 template-haskell >= 2.16,
249 transformers >= 0.5