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