diff options
author | Csaba Hruska <csaba.hruska@gmail.com> | 2015-12-21 13:48:22 +0100 |
---|---|---|
committer | Csaba Hruska <csaba.hruska@gmail.com> | 2015-12-21 13:48:22 +0100 |
commit | befc5afb22b36d744c403d103d591c5d190d394f (patch) | |
tree | 05e390bef55b0662a9a919b886322b66b113ff21 /templates/data.hpp.ede | |
parent | dc8e31235fccbe5ea54d94b0ca69e005ca88c7ea (diff) |
add lambdacube-ir haskell lib
Diffstat (limited to 'templates/data.hpp.ede')
-rw-r--r-- | templates/data.hpp.ede | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/templates/data.hpp.ede b/templates/data.hpp.ede deleted file mode 100644 index dab478c..0000000 --- a/templates/data.hpp.ede +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | // generated file, do not modify! | ||
2 | // {{ dateTime }} | ||
3 | |||
4 | #ifndef HEADER_{{ moduleName }}_H | ||
5 | #define HEADER_{{ moduleName }}_H | ||
6 | |||
7 | #include "RT.hpp" | ||
8 | |||
9 | {% for m in imports %} | ||
10 | #include "{{ m.value }}.hpp" | ||
11 | {% endfor %} | ||
12 | |||
13 | {% for t in dataAndType %} | ||
14 | {% case t.value | constType %} | ||
15 | {% when "DataDef" %} | ||
16 | class {{ t.value.dataName }} { | ||
17 | public: | ||
18 | enum class tag { {% for c in t.value.constructors %} | ||
19 | {{ c.value.name }}{% if !c.last %},{% endif %}{% endfor %} | ||
20 | } tag; | ||
21 | }; | ||
22 | namespace data { {% for c in t.value.constructors %}{% if !(c.value.fields | empty) %} | ||
23 | class {{ c.value.name }} : public ::{{ t.value.dataName }} { | ||
24 | public:{% for f in c.value.fields %}{% if c.value.fields | hasFieldNames %} | ||
25 | {{ f.value.fieldType | cppType }} {{ f.value.fieldName }};{% else %} | ||
26 | {{ f.value.fieldType | cppType | parens }} _{{ f.index0 }};{% endif %}{% endfor %} | ||
27 | {{ c.value.name }}() { tag = tag::{{ c.value.name }}; } | ||
28 | };{% endif %}{% endfor %} | ||
29 | } | ||
30 | {% when "TypeAlias" %} | ||
31 | {% case t.value.aliasType.tag %} | ||
32 | {% when "Data" %} | ||
33 | typedef {{ t.value.aliasType.contents }} {{ t.value.aliasName }}; | ||
34 | {% else %} | ||
35 | typedef {{ t.value.aliasType | cppType }} {{ t.value.aliasName }}; | ||
36 | {% endcase %} | ||
37 | |||
38 | {% endcase %} | ||
39 | {% endfor %} | ||
40 | #endif | ||