]> 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 one has to be able to construct it at runtime.
25 .
26 This code (including its Test.hs files) demonstrates this 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 alterating them).
34 .
35 * Interpreting a /symantic/ expression
36 multiple times and with different interpreters
37 without reparsing the expression.
38 .
39 Your comments, problem reports, or questions are very welcome! :-)
40 extra-source-files:
41 extra-tmp-files:
42 -- homepage: http://pad.autogeree.net/informatique/lol/symantic/
43 license: GPL-3
44 license-file: COPYING
45 maintainer: Julien Moutinho <julm+lol@autogeree.net>
46 name: lol-symantic
47 stability: experimental
48 synopsis: Demo of Typed Tagless-Final Higher-Order Extensible DSL
49 tested-with: GHC==7.10.3
50 version: 1.20161006
51
52 Source-Repository head
53 location: git://git.autogeree.net/lol
54 type: git
55
56 Flag dev
57 Default: False
58 Description: Turn on development settings.
59 Manual: True
60
61 Flag dump
62 Default: False
63 Description: Dump some intermediate files.
64 Manual: True
65
66 Flag prof
67 Default: False
68 Description: Turn on profiling settings.
69 Manual: True
70
71 Flag threaded
72 Default: False
73 Description: Enable threads.
74 Manual: True
75
76 Library
77 default-extensions:
78 ghc-options: -Wall -fno-warn-tabs
79 if flag(dev)
80 cpp-options: -DDEVELOPMENT
81 ghc-options:
82 -- -ddump-splices
83 -- -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
84 -- -fno-warn-type-defaults -fno-warn-orphans
85 if flag(dump)
86 ghc-options: -ddump-simpl -ddump-stg -ddump-to-file
87 if flag(prof)
88 cpp-options: -DPROFILING
89 ghc-options: -fprof-auto
90 default-language: Haskell2010
91 exposed-modules:
92 Language.LOL.Symantic
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.Expr.Maybe
100 Language.LOL.Symantic.Expr.If
101 Language.LOL.Symantic.Lib.Control.Monad
102 Language.LOL.Symantic.Lib.Data.Peano
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 Language.LOL.Symantic.Type.Var
118 build-depends:
119 base >= 4.6 && < 5
120 , ghc-prim
121 , monad-classes >= 0.3.1.1
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.If.Test
138 Expr.Int.Test
139 Expr.Lambda.Test
140 Expr.Maybe.Test
141 Expr.Test
142 Repr.Host.Test
143 Repr.String.Test
144 Repr.Test
145 Trans.Bool.Const.Test
146 Trans.Bool.Test
147 Trans.Test
148 Type.Test
149 if flag(threaded)
150 ghc-options: -threaded -rtsopts -with-rtsopts=-N
151 if flag(dev)
152 cpp-options: -DDEVELOPMENT
153 ghc-options:
154 if flag(prof)
155 cpp-options: -DPROFILING
156 ghc-options: -fprof-auto
157 build-depends:
158 base >= 4.6 && < 5
159 , transformers
160 , tasty >= 0.11
161 , tasty-hunit
162 , lol-symantic