1 author: Julien Moutinho <julm+symantic@autogeree.net>
2 -- bug-reports: http://doc.autogeree.net/symantic/bugs
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.
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, …).
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.
25 This library (including its Test.hs files) demonstrates this
26 for a few usual types and methods, by:
28 * Parsing a /symantic/ expression
29 from an AST (Abstract Syntax Tree).
31 * Removing or adding /symantic/ parsers
32 by fully reusing old parsers
33 (i.e. without copying or altering them).
35 * Interpreting a /symantic/ expression
36 multiple times and with different interpreters
37 without reparsing the expression.
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.
43 Your comments, problem reports, or questions are very welcome! :-)
45 NOTE: alternative libraries to do more or less the same things
46 include: <https://hackage.haskell.org/package/syntactic syntactic>.
49 -- homepage: http://pad.autogeree.net/informatique/symantic/
52 maintainer: Julien Moutinho <julm+symantic@autogeree.net>
54 stability: experimental
55 synopsis: Library for Typed Tagless-Final Higher-Order Extensible DSL
56 tested-with: GHC==7.10.3
59 Source-Repository head
60 location: git://git.autogeree.net/symantic
65 Description: Turn on development settings.
70 Description: Dump some intermediate files.
75 Description: Turn on profiling settings.
80 Description: Enable threads.
85 ghc-options: -Wall -fno-warn-tabs
87 cpp-options: -DDEVELOPMENT
90 -- -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
91 -- -fno-warn-type-defaults -fno-warn-orphans
93 ghc-options: -ddump-simpl -ddump-stg -ddump-to-file
95 cpp-options: -DPROFILING
96 ghc-options: -fprof-auto
97 default-language: Haskell2010
100 Language.Symantic.Expr
101 Language.Symantic.Expr.Bool
102 Language.Symantic.Expr.Common
103 Language.Symantic.Expr.Eq
104 Language.Symantic.Expr.If
105 Language.Symantic.Expr.Int
106 Language.Symantic.Expr.Lambda
107 Language.Symantic.Expr.List
108 Language.Symantic.Expr.Map
109 Language.Symantic.Expr.Maybe
110 Language.Symantic.Expr.Ord
111 Language.Symantic.Expr.Tuple
112 Language.Symantic.Lib.Control.Monad
113 Language.Symantic.Lib.Data.Peano
114 Language.Symantic.Repr
115 Language.Symantic.Repr.Dup
116 Language.Symantic.Repr.Host
117 Language.Symantic.Repr.Text
118 Language.Symantic.Trans
119 Language.Symantic.Trans.Bool
120 Language.Symantic.Trans.Bool.Const
121 Language.Symantic.Trans.Common
122 Language.Symantic.Type
123 Language.Symantic.Type.Bool
124 Language.Symantic.Type.Common
125 Language.Symantic.Type.Fun
126 Language.Symantic.Type.Int
127 Language.Symantic.Type.List
128 Language.Symantic.Type.Map
129 Language.Symantic.Type.Maybe
130 Language.Symantic.Type.Ordering
131 Language.Symantic.Type.Tuple
132 Language.Symantic.Type.Unit
133 Language.Symantic.Type.Var
138 -- , monad-classes >= 0.3.1.1
142 Test-Suite symantic-test
143 type: exitcode-stdio-1.0
146 default-language: Haskell2010
147 ghc-options: -Wall -fno-warn-tabs
149 hs-source-dirs: Language/Symantic
164 Trans.Bool.Const.Test
169 ghc-options: -threaded -rtsopts -with-rtsopts=-N
171 cpp-options: -DDEVELOPMENT
174 cpp-options: -DPROFILING
175 ghc-options: -fprof-auto