]> Git — Sourcephile - haskell/symantic-parser.git/blob - symantic-parser.cabal
rename Machine.{Gen => Generate}
[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 DefaultSignatures 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.Grammar
70 Symantic.Parser.Grammar.Combinators
71 Symantic.Parser.Grammar.Dump
72 Symantic.Parser.Grammar.Fixity
73 Symantic.Parser.Grammar.ObserveSharing
74 Symantic.Parser.Grammar.Optimize
75 Symantic.Parser.Grammar.Write
76 Symantic.Parser.Machine
77 Symantic.Parser.Machine.Dump
78 Symantic.Parser.Machine.Generate
79 Symantic.Parser.Machine.Input
80 Symantic.Parser.Machine.Instructions
81 Symantic.Parser.Staging
82 other-modules:
83 default-extensions:
84 BangPatterns,
85 DataKinds,
86 FlexibleContexts,
87 FlexibleInstances,
88 GADTs,
89 GeneralizedNewtypeDeriving,
90 LambdaCase,
91 MultiParamTypeClasses,
92 NamedFieldPuns,
93 NoImplicitPrelude,
94 RankNTypes,
95 RecordWildCards,
96 ScopedTypeVariables,
97 TypeApplications,
98 TypeFamilies,
99 TypeOperators
100 build-depends:
101 base >=4.10 && <5,
102 array,
103 bytestring,
104 containers,
105 ghc-prim,
106 hashable,
107 parallel,
108 template-haskell >= 2.15,
109 -- template-haskell >= 2.16,
110 text,
111 transformers,
112 unordered-containers
113 default-language: Haskell2010
114 ghc-options:
115 -ddump-splices
116 -ddump-to-file
117 -Wall
118 -Wincomplete-uni-patterns
119 -Wincomplete-record-updates
120
121 Test-Suite symantic-parser-test
122 type: exitcode-stdio-1.0
123 hs-source-dirs: test
124 main-is: Main.hs
125 other-modules:
126 Golden
127 Golden.Grammar
128 -- Golden.Utils
129 -- Golden.Parsers
130 -- HUnit
131 -- QuickCheck
132 default-language: Haskell2010
133 default-extensions:
134 FlexibleContexts
135 LambdaCase
136 NamedFieldPuns
137 NoImplicitPrelude
138 RecordWildCards
139 RankNTypes,
140 ScopedTypeVariables
141 TypeApplications
142 TypeFamilies
143 TypeOperators
144 ViewPatterns
145 ghc-options:
146 -Wall
147 -Wincomplete-uni-patterns
148 -Wincomplete-record-updates
149 -fhide-source-paths
150 -freverse-errors
151 -ddump-splices
152 -ddump-to-file
153 build-depends:
154 symantic-parser,
155 base >= 4.10 && < 5,
156 bytestring >= 0.10,
157 containers >= 0.5,
158 deepseq >= 1.4,
159 directory >= 1.3,
160 filepath >= 1.4,
161 hashable >= 1.2.6,
162 process >= 1.6,
163 strict >= 0.4,
164 tasty >= 0.11,
165 tasty-golden >= 2.3,
166 -- tasty-hunit,
167 template-haskell >= 2.15,
168 temporary >= 1.3,
169 text >= 1.2,
170 -- time >= 1.9,
171 transformers >= 0.4,
172 -- QuickCheck >= 2.0,
173 -- tasty-quickcheck,
174 unix >= 2.7,
175 unordered-containers
176
177 -- Executable symantic-parser
178 -- hs-source-dirs: exe
179 -- main-is: Main.hs
180 -- other-modules:
181 -- default-language: Haskell2010
182 -- default-extensions:
183 -- LambdaCase
184 -- NamedFieldPuns
185 -- NoImplicitPrelude
186 -- RecordWildCards
187 -- TypeFamilies
188 -- ViewPatterns
189 -- ghc-options:
190 -- -Wall
191 -- -Wincomplete-uni-patterns
192 -- -Wincomplete-record-updates
193 -- -fhide-source-paths
194 -- -threaded -rtsopts
195 -- -freverse-errors
196 -- build-depends:
197 -- symantic-parser,
198 -- base >= 4.10 && < 5,
199 -- bytestring >= 0.10,
200 -- containers >= 0.5,
201 -- deepseq >= 1.4,
202 -- hashable >= 1.2.6,
203 -- text >= 1.2,
204 -- transformers >= 0.4,
205 -- unordered-containers,
206 -- unix