1 author: Julien Moutinho <julm+lol@autogeree.net>
2 -- bug-reports: http://doc.autogeree.net/lol/bugs
9 Library 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.
15 Around a few usual 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, …).
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.
26 This code (including its Test.hs files) demonstrates this 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 alterating them).
35 * Interpreting a /symantic/ expression
36 multiple times and with different interpreters
37 without reparsing the expression.
39 Your comments, problem reports, or questions are very welcome! :-)
42 -- homepage: http://pad.autogeree.net/informatique/lol/symantic/
45 maintainer: Julien Moutinho <julm+lol@autogeree.net>
47 stability: experimental
48 synopsis: Typed Tagless-Final Higher-Order Extensible DSL
49 tested-with: GHC==7.10.3
52 Source-Repository head
53 location: git://git.autogeree.net/lol
58 Description: Turn on development settings.
63 Description: Dump some intermediate files.
68 Description: Turn on profiling settings.
73 Description: Enable threads.
78 ghc-options: -Wall -fno-warn-tabs
80 cpp-options: -DDEVELOPMENT
83 -- -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
84 -- -fno-warn-type-defaults -fno-warn-orphans
86 ghc-options: -ddump-simpl -ddump-stg -ddump-to-file
88 cpp-options: -DPROFILING
89 ghc-options: -fprof-auto
90 default-language: Haskell2010
93 Language.LOL.Symantic.Expr
94 Language.LOL.Symantic.Expr.Bool
95 Language.LOL.Symantic.Expr.Common
96 Language.LOL.Symantic.Expr.Int
97 Language.LOL.Symantic.Expr.Lambda
98 Language.LOL.Symantic.Expr.Maybe
99 Language.LOL.Symantic.Expr.If
100 Language.LOL.Symantic.Lib.Control.Monad
101 Language.LOL.Symantic.Lib.Data.Peano
102 Language.LOL.Symantic.Repr
103 Language.LOL.Symantic.Repr.Dup
104 Language.LOL.Symantic.Repr.Host
105 Language.LOL.Symantic.Repr.Text
106 Language.LOL.Symantic.Trans
107 Language.LOL.Symantic.Trans.Bool
108 Language.LOL.Symantic.Trans.Bool.Const
109 Language.LOL.Symantic.Trans.Common
110 Language.LOL.Symantic.Type
111 Language.LOL.Symantic.Type.Unit
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
121 , monad-classes >= 0.3.1.1
125 Test-Suite lol-symantic-test
126 type: exitcode-stdio-1.0
129 default-language: Haskell2010
130 ghc-options: -Wall -fno-warn-tabs
132 hs-source-dirs: Language/LOL/Symantic
145 Trans.Bool.Const.Test
150 ghc-options: -threaded -rtsopts -with-rtsopts=-N
152 cpp-options: -DDEVELOPMENT
155 cpp-options: -DPROFILING
156 ghc-options: -fprof-auto