]> Git — Sourcephile - haskell/symantic.git/blob - lol-symantic.cabal
init
[haskell/symantic.git] / lol-symantic.cabal
1 author: Julien Moutinho <julm+lol@autogeree.net>
2 -- bug-reports: http://doc.autogeree.net/lol/bugs
3 build-type: Simple
4 cabal-version: >= 1.10
5 category: Language
6 -- data-dir: data
7 -- data-files:
8 description:
9 Demonstration code gathering important ideas from the
10 <http://okmij.org/ftp/tagless-final/ Tagless-Final>
11 approach to Embedded DSL (Domain-Specific Language)
12 developed by Jacques Carette, Oleg Kiselyov and Chung-chieh Shan,
13 and pursuing this work to use it as a non-Embedded DSL.
14 .
15 For a few example types (function, 'Bool', 'Int', 'Maybe')
16 a so-called /symantic/ type class defines a /syntax/
17 and each of its instances defines a new /semantic/
18 (computing a Haskell term, serializing, optimizing, …).
19 .
20 Combining the methods of those /symantic/ type classes
21 gives rise to a DSL within which one can
22 write /symantic/ expressions at developing time;
23 but in order to handle such expression when entered by an end-user
24 (for instance as a query for a search engine,
25 or a formula in a spreadsheet),
26 one has to be able to construct it at runtime,
27 that is, to be able to:
28 .
29 * Parse a /symantic/ expression
30 from an AST (Abstract Syntax Tree).
31 .
32 * Remove or add /symantic/ parsers
33 by fully reusing old parsers
34 (i.e. without copying or alterating them).
35 .
36 * Interpret a /symantic/ expression
37 multiple times and with different interpreters
38 without reparsing the expression.
39 .
40 This is what this code (including its Test.hs files) demonstrates.
41 Your comments, problem reports, or questions are very welcome! :-)
42 extra-source-files:
43 extra-tmp-files:
44 -- homepage: http://pad.autogeree.net/informatique/lol/symantic/
45 license: GPL-3
46 license-file: COPYING
47 maintainer: Julien Moutinho <julm+lol@autogeree.net>
48 name: lol-symantic
49 stability: experimental
50 synopsis: Demo of Typed Tagless-Final Higher-Order Extensible DSL
51 tested-with: GHC==7.10.3
52 version: 1.20161002
53
54 Source-Repository head
55 location: git://git.autogeree.net/lol
56 type: git
57
58 Flag dev
59 Default: False
60 Description: Turn on development settings.
61 Manual: True
62
63 Flag dump
64 Default: False
65 Description: Dump some intermediate files.
66 Manual: True
67
68 Flag prof
69 Default: False
70 Description: Turn on profiling settings.
71 Manual: True
72
73 Flag threaded
74 Default: False
75 Description: Enable threads.
76 Manual: True
77
78 Library
79 default-extensions:
80 ghc-options: -Wall -fno-warn-tabs
81 if flag(dev)
82 cpp-options: -DDEVELOPMENT
83 ghc-options:
84 -- -ddump-splices
85 -- -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
86 -- -fno-warn-type-defaults -fno-warn-orphans
87 if flag(dump)
88 ghc-options: -ddump-simpl -ddump-stg -ddump-to-file
89 if flag(prof)
90 cpp-options: -DPROFILING
91 ghc-options: -fprof-auto
92 default-language: Haskell2010
93 exposed-modules:
94 Language.LOL.Symantic
95 Language.LOL.Symantic.AST
96 Language.LOL.Symantic.Expr
97 Language.LOL.Symantic.Expr.Bool
98 Language.LOL.Symantic.Expr.Common
99 Language.LOL.Symantic.Expr.Int
100 Language.LOL.Symantic.Expr.Lambda
101 Language.LOL.Symantic.Expr.Maybe
102 Language.LOL.Symantic.Lib.Control.Monad
103 Language.LOL.Symantic.Repr
104 Language.LOL.Symantic.Repr.Dup
105 Language.LOL.Symantic.Repr.Host
106 Language.LOL.Symantic.Repr.String
107 Language.LOL.Symantic.Trans
108 Language.LOL.Symantic.Trans.Bool
109 Language.LOL.Symantic.Trans.Bool.Const
110 Language.LOL.Symantic.Trans.Common
111 Language.LOL.Symantic.Type
112 Language.LOL.Symantic.Type.Bool
113 Language.LOL.Symantic.Type.Common
114 Language.LOL.Symantic.Type.Fun
115 Language.LOL.Symantic.Type.Int
116 Language.LOL.Symantic.Type.Maybe
117 build-depends:
118 base >= 4.6 && < 5
119 , ghc-prim
120 , monad-classes >= 0.3.1.1
121 , peano
122 , transformers
123 , text
124
125 Test-Suite lol-symantic-test
126 type: exitcode-stdio-1.0
127 default-extensions:
128 OverloadedStrings
129 default-language: Haskell2010
130 ghc-options: -Wall -fno-warn-tabs
131 -main-is Test
132 hs-source-dirs: Language/LOL/Symantic
133 main-is: Test.hs
134 other-modules:
135 AST.Test
136 Expr.Bool.Test
137 Expr.Int.Test
138 Expr.Lambda.Test
139 Expr.Maybe.Test
140 Expr.Test
141 Repr.Host.Test
142 Repr.String.Test
143 Repr.Test
144 Trans.Bool.Const.Test
145 Trans.Bool.Test
146 Trans.Test
147 Type.Test
148 if flag(threaded)
149 ghc-options: -threaded -rtsopts -with-rtsopts=-N
150 if flag(dev)
151 cpp-options: -DDEVELOPMENT
152 ghc-options:
153 if flag(prof)
154 cpp-options: -DPROFILING
155 ghc-options: -fprof-auto
156 build-depends:
157 base >= 4.6 && < 5
158 , transformers
159 , tasty >= 0.11
160 , tasty-hunit
161 , lol-symantic