]> Git — Sourcephile - haskell/symantic.git/blob - symantic.cabal
fix (->) by removing inline/val/lazy
[haskell/symantic.git] / symantic.cabal
1 author: Julien Moutinho <julm+symantic@autogeree.net>
2 -- bug-reports: http://doc.autogeree.net/symantic/bugs
3 build-type: Simple
4 cabal-version: >= 1.10
5 category: Language
6 -- data-dir: data
7 -- data-files:
8 description:
9 Library gathering main ideas from the
10 <http://okmij.org/ftp/tagless-final/ Tagless-Final>
11 approach of embedded DSL (Domain-Specific Language)
12 developed by Jacques Carette, Oleg Kiselyov and Chung-chieh Shan,
13 and pursuing their work to make it usable as a non-embedded DSL.
14 .
15 A so-called /symantic/ type class defines a /syntax/
16 and each of its instances defines a new /semantic/
17 (computing a Haskell term, serializing, optimizing, …).
18 .
19 Combining the methods of those /symantic/ type classes
20 gives rise to a DSL within which one can
21 write /symantic/ expressions at developing time;
22 but in order to handle such expression when entered by an end-user,
23 one has to be able to construct it at runtime.
24 .
25 This library (including its Test.hs files) demonstrates this
26 for a few usual types and methods, by:
27 .
28 * Parsing a /symantic/ expression
29 from an AST (Abstract Syntax Tree).
30 .
31 * Removing or adding /symantic/ parsers
32 by fully reusing old parsers
33 (i.e. without copying or altering them).
34 .
35 * Interpreting a /symantic/ expression
36 multiple times and with different interpreters
37 without reparsing the expression.
38 .
39 Hence, one can select all or a few expressions (and associated types)
40 of this library, add its own, parse them at runtime from its own AST,
41 and then interpret them at will.
42 .
43 One important drawback of this flexibility
44 is the introduction of a lot of type constraints,
45 so far this hasn't discouraged me… because for this
46 reading the vertically-aligned source code is easier
47 than its Haddock rendition.
48 .
49 Your comments, problem reports, or questions are very welcome! :-)
50 .
51 NOTE: alternative libraries to do more or less the same things
52 include: <https://hackage.haskell.org/package/syntactic syntactic>.
53 extra-source-files:
54 extra-tmp-files:
55 -- homepage: http://pad.autogeree.net/informatique/symantic/
56 license: GPL-3
57 license-file: COPYING
58 maintainer: Julien Moutinho <julm+symantic@autogeree.net>
59 name: symantic
60 stability: experimental
61 synopsis: Library for Typed Tagless-Final Higher-Order Extensible DSL
62 tested-with: GHC==7.10.3
63 version: 1.20161110
64
65 Source-Repository head
66 location: git://git.autogeree.net/symantic
67 type: git
68
69 Flag dev
70 Default: False
71 Description: Turn on development settings.
72 Manual: True
73
74 Flag dump
75 Default: False
76 Description: Dump some intermediate files.
77 Manual: True
78
79 Flag prof
80 Default: False
81 Description: Turn on profiling settings.
82 Manual: True
83
84 Flag threaded
85 Default: False
86 Description: Enable threads.
87 Manual: True
88
89 Library
90 default-extensions:
91 ghc-options: -Wall -fno-warn-tabs
92 if flag(dev)
93 cpp-options: -DDEVELOPMENT
94 ghc-options:
95 -- -ddump-splices
96 -- -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
97 -- -fno-warn-type-defaults -fno-warn-orphans
98 if flag(dump)
99 ghc-options: -ddump-simpl -ddump-stg -ddump-to-file
100 if flag(prof)
101 cpp-options: -DPROFILING
102 ghc-options: -fprof-auto
103 default-language: Haskell2010
104 exposed-modules:
105 Language.Symantic
106 Language.Symantic.Expr
107 Language.Symantic.Expr.Alt
108 Language.Symantic.Expr.Applicative
109 Language.Symantic.Expr.Bool
110 Language.Symantic.Expr.Either
111 Language.Symantic.Expr.Eq
112 Language.Symantic.Expr.Error
113 Language.Symantic.Expr.Foldable
114 Language.Symantic.Expr.From
115 Language.Symantic.Expr.Functor
116 Language.Symantic.Expr.If
117 Language.Symantic.Expr.Int
118 Language.Symantic.Expr.IO
119 Language.Symantic.Expr.Lambda
120 Language.Symantic.Expr.List
121 Language.Symantic.Expr.Map
122 Language.Symantic.Expr.Maybe
123 Language.Symantic.Expr.Monad
124 Language.Symantic.Expr.Monoid
125 Language.Symantic.Expr.Ord
126 Language.Symantic.Expr.Root
127 Language.Symantic.Expr.Text
128 Language.Symantic.Expr.Traversable
129 Language.Symantic.Expr.Tuple
130 Language.Symantic.Lib.Control.Monad
131 Language.Symantic.Lib.Data.Bool
132 Language.Symantic.Lib.Data.Peano
133 Language.Symantic.Repr
134 Language.Symantic.Repr.Dup
135 Language.Symantic.Repr.Host
136 Language.Symantic.Repr.Text
137 Language.Symantic.Trans
138 Language.Symantic.Trans.Bool
139 Language.Symantic.Trans.Bool.Const
140 Language.Symantic.Trans.Common
141 Language.Symantic.Type
142 Language.Symantic.Type.Alt
143 Language.Symantic.Type.Bool
144 Language.Symantic.Type.Either
145 Language.Symantic.Type.Error
146 Language.Symantic.Type.Fun
147 Language.Symantic.Type.Int
148 Language.Symantic.Type.IO
149 Language.Symantic.Type.List
150 Language.Symantic.Type.Map
151 Language.Symantic.Type.Maybe
152 Language.Symantic.Type.Ordering
153 Language.Symantic.Type.Root
154 Language.Symantic.Type.Text
155 Language.Symantic.Type.Tuple
156 Language.Symantic.Type.Type0
157 Language.Symantic.Type.Type1
158 Language.Symantic.Type.Type2
159 Language.Symantic.Type.Unit
160 Language.Symantic.Type.Var
161 build-depends:
162 base >= 4.6 && < 5
163 , containers
164 , ghc-prim
165 , transformers
166 , text
167
168 Test-Suite symantic-test
169 type: exitcode-stdio-1.0
170 default-extensions:
171 OverloadedStrings
172 default-language: Haskell2010
173 ghc-options: -Wall -fno-warn-tabs
174 -main-is Test
175 hs-source-dirs: Language/Symantic
176 main-is: Test.hs
177 other-modules:
178 AST.Test
179 Expr.Applicative.Test
180 Expr.Bool.Test
181 Expr.Eq.Test
182 Expr.Foldable.Test
183 Expr.Functor.Test
184 Expr.If.Test
185 Expr.Int.Test
186 Expr.Lambda.Test
187 Expr.List.Test
188 Expr.Maybe.Test
189 Expr.Monad.Test
190 Expr.Test
191 Expr.Traversable.Test
192 Repr.Host.Test
193 Repr.Test
194 Repr.Text.Test
195 Trans.Bool.Const.Test
196 Trans.Bool.Test
197 Trans.Test
198 Type.Test
199 if flag(threaded)
200 ghc-options: -threaded -rtsopts -with-rtsopts=-N
201 if flag(dev)
202 cpp-options: -DDEVELOPMENT
203 ghc-options:
204 if flag(prof)
205 cpp-options: -DPROFILING
206 ghc-options: -fprof-auto
207 build-depends:
208 base >= 4.6 && < 5
209 , transformers
210 , tasty >= 0.11
211 , tasty-hunit
212 , text
213 , symantic