]> 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, boolean, integer)
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 one has to be able to construct it at runtime,
26 that is, to be able to:
27 .
28 * Parse a /symantic/ expression
29 from an AST (Abstract Syntax Tree).
30 .
31 * Remove or add /symantic/ parsers
32 by fully reusing old parsers
33 (i.e. without copying or alterating them).
34 .
35 * Interpret a /symantic/ expression
36 multiple times and with different interpreters
37 without reparsing the expression.
38 .
39 This is what this code (including its Test.hs files) demonstrates.
40 Your comments, problem reports, or questions are very welcome! :-)
41 extra-source-files:
42 extra-tmp-files:
43 -- homepage: http://pad.autogeree.net/informatique/lol/symantic/
44 license: GPL-3
45 license-file: COPYING
46 maintainer: Julien Moutinho <julm+lol@autogeree.net>
47 name: lol-symantic
48 stability: experimental
49 synopsis: Demo of Typed Tagless-Final Higher-Order Extensible DSL
50 tested-with: GHC==7.10.3
51 version: 1.20161002
52
53 Source-Repository head
54 location: git://git.autogeree.net/lol
55 type: git
56
57 Flag dev
58 Default: False
59 Description: Turn on development settings.
60 Manual: True
61
62 Flag dump
63 Default: False
64 Description: Dump some intermediate files.
65 Manual: True
66
67 Flag prof
68 Default: False
69 Description: Turn on profiling settings.
70 Manual: True
71
72 Flag threaded
73 Default: False
74 Description: Enable threads.
75 Manual: True
76
77 Library
78 default-extensions:
79 ghc-options: -Wall -fno-warn-tabs
80 if flag(dev)
81 cpp-options: -DDEVELOPMENT
82 ghc-options:
83 -- -ddump-splices
84 -- -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
85 -- -fno-warn-type-defaults -fno-warn-orphans
86 if flag(dump)
87 ghc-options: -ddump-simpl -ddump-stg -ddump-to-file
88 if flag(prof)
89 cpp-options: -DPROFILING
90 ghc-options: -fprof-auto
91 default-language: Haskell2010
92 exposed-modules:
93 Language.LOL.Symantic.AST
94 Language.LOL.Symantic.Expr
95 Language.LOL.Symantic.Expr.Bool
96 Language.LOL.Symantic.Expr.Common
97 Language.LOL.Symantic.Expr.Int
98 Language.LOL.Symantic.Expr.Lambda
99 Language.LOL.Symantic.Lib.Control.Monad
100 Language.LOL.Symantic.Repr
101 Language.LOL.Symantic.Repr.Dup
102 Language.LOL.Symantic.Repr.Host
103 Language.LOL.Symantic.Repr.String
104 Language.LOL.Symantic.Trans
105 Language.LOL.Symantic.Trans.Bool
106 Language.LOL.Symantic.Trans.Bool.Const
107 Language.LOL.Symantic.Trans.Common
108 Language.LOL.Symantic.Type
109 Language.LOL.Symantic.Type.Bool
110 Language.LOL.Symantic.Type.Common
111 Language.LOL.Symantic.Type.Fun
112 Language.LOL.Symantic.Type.Int
113 build-depends:
114 base >= 4.6 && < 5
115 , ghc-prim
116 , monad-classes >= 0.3.1.1
117 , peano
118 , transformers
119 , text
120
121 Test-Suite lol-symantic-test
122 type: exitcode-stdio-1.0
123 default-extensions:
124 OverloadedStrings
125 default-language: Haskell2010
126 ghc-options: -Wall -fno-warn-tabs
127 -main-is Test
128 hs-source-dirs: Language/LOL/Symantic
129 main-is: Test.hs
130 other-modules:
131 AST.Test
132 Expr.Bool.Test
133 Expr.Int.Test
134 Expr.Lambda.Test
135 Expr.Test
136 Repr.Host.Test
137 Repr.String.Test
138 Repr.Test
139 Trans.Bool.Const.Test
140 Trans.Bool.Test
141 Trans.Test
142 Type.Test
143 if flag(threaded)
144 ghc-options: -threaded -rtsopts -with-rtsopts=-N
145 if flag(dev)
146 cpp-options: -DDEVELOPMENT
147 ghc-options:
148 if flag(prof)
149 cpp-options: -DPROFILING
150 ghc-options: -fprof-auto
151 build-depends:
152 base >= 4.6 && < 5
153 , transformers
154 , tasty >= 0.11
155 , tasty-hunit
156 , lol-symantic