]> Git — Sourcephile - haskell/symantic.git/blob - symantic.cabal
init
[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 important 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 Your comments, problem reports, or questions are very welcome! :-)
44 .
45 NOTE: alternative libraries to do more or less the same things
46 include: <https://hackage.haskell.org/package/syntactic syntactic>.
47 extra-source-files:
48 extra-tmp-files:
49 -- homepage: http://pad.autogeree.net/informatique/symantic/
50 license: GPL-3
51 license-file: COPYING
52 maintainer: Julien Moutinho <julm+symantic@autogeree.net>
53 name: symantic
54 stability: experimental
55 synopsis: Library for Typed Tagless-Final Higher-Order Extensible DSL
56 tested-with: GHC==7.10.3
57 version: 1.20161008
58
59 Source-Repository head
60 location: git://git.autogeree.net/symantic
61 type: git
62
63 Flag dev
64 Default: False
65 Description: Turn on development settings.
66 Manual: True
67
68 Flag dump
69 Default: False
70 Description: Dump some intermediate files.
71 Manual: True
72
73 Flag prof
74 Default: False
75 Description: Turn on profiling settings.
76 Manual: True
77
78 Flag threaded
79 Default: False
80 Description: Enable threads.
81 Manual: True
82
83 Library
84 default-extensions:
85 ghc-options: -Wall -fno-warn-tabs
86 if flag(dev)
87 cpp-options: -DDEVELOPMENT
88 ghc-options:
89 -- -ddump-splices
90 -- -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
91 -- -fno-warn-type-defaults -fno-warn-orphans
92 if flag(dump)
93 ghc-options: -ddump-simpl -ddump-stg -ddump-to-file
94 if flag(prof)
95 cpp-options: -DPROFILING
96 ghc-options: -fprof-auto
97 default-language: Haskell2010
98 exposed-modules:
99 Language.Symantic
100 Language.Symantic.Expr
101 Language.Symantic.Expr.Applicative
102 Language.Symantic.Expr.Bool
103 Language.Symantic.Expr.Common
104 Language.Symantic.Expr.Eq
105 Language.Symantic.Expr.Functor
106 Language.Symantic.Expr.If
107 Language.Symantic.Expr.Int
108 Language.Symantic.Expr.Lambda
109 Language.Symantic.Expr.List
110 Language.Symantic.Expr.Map
111 Language.Symantic.Expr.Maybe
112 Language.Symantic.Expr.Ord
113 Language.Symantic.Expr.Tuple
114 Language.Symantic.Lib.Control.Monad
115 Language.Symantic.Lib.Data.Peano
116 Language.Symantic.Repr
117 Language.Symantic.Repr.Dup
118 Language.Symantic.Repr.Host
119 Language.Symantic.Repr.Text
120 Language.Symantic.Trans
121 Language.Symantic.Trans.Bool
122 Language.Symantic.Trans.Bool.Const
123 Language.Symantic.Trans.Common
124 Language.Symantic.Type
125 Language.Symantic.Type.Bool
126 Language.Symantic.Type.Common
127 Language.Symantic.Type.Fun
128 Language.Symantic.Type.Int
129 Language.Symantic.Type.List
130 Language.Symantic.Type.Map
131 Language.Symantic.Type.Maybe
132 Language.Symantic.Type.Ordering
133 Language.Symantic.Type.Tuple
134 Language.Symantic.Type.Unit
135 Language.Symantic.Type.Var
136 build-depends:
137 base >= 4.6 && < 5
138 , containers
139 , ghc-prim
140 -- , monad-classes >= 0.3.1.1
141 , transformers
142 , text
143
144 Test-Suite symantic-test
145 type: exitcode-stdio-1.0
146 default-extensions:
147 OverloadedStrings
148 default-language: Haskell2010
149 ghc-options: -Wall -fno-warn-tabs
150 -main-is Test
151 hs-source-dirs: Language/Symantic
152 main-is: Test.hs
153 other-modules:
154 AST.Test
155 Expr.Bool.Test
156 Expr.Eq.Test
157 Expr.Functor.Test
158 Expr.If.Test
159 Expr.Int.Test
160 Expr.Lambda.Test
161 Expr.List.Test
162 Expr.Maybe.Test
163 Expr.Test
164 Repr.Host.Test
165 Repr.Test
166 Repr.Text.Test
167 Trans.Bool.Const.Test
168 Trans.Bool.Test
169 Trans.Test
170 Type.Test
171 if flag(threaded)
172 ghc-options: -threaded -rtsopts -with-rtsopts=-N
173 if flag(dev)
174 cpp-options: -DDEVELOPMENT
175 ghc-options:
176 if flag(prof)
177 cpp-options: -DPROFILING
178 ghc-options: -fprof-auto
179 build-depends:
180 base >= 4.6 && < 5
181 , transformers
182 , tasty >= 0.11
183 , tasty-hunit
184 , text
185 , symantic