diff options
31 files changed, 93 insertions, 93 deletions
diff --git a/ddl/Definitions.hs b/ddl/Definitions.hs index 6fd6afd..04f461c 100644 --- a/ddl/Definitions.hs +++ b/ddl/Definitions.hs | |||
@@ -468,9 +468,9 @@ typeInfo = do | |||
468 | , "text" #:: String | 468 | , "text" #:: String |
469 | ] | 469 | ] |
470 | 470 | ||
471 | data_ "MyEither" $ do | 471 | data_ "CompileResult" $ do |
472 | const_ "MyLeft" ["TypeInfo", Array "TypeInfo"] | 472 | const_ "CompileError" [Array "TypeInfo", Array "TypeInfo"] |
473 | const_ "MyRight" [String, "Pipeline", Array "TypeInfo"] | 473 | const_ "Compiled" [String, "Pipeline", Array "TypeInfo"] |
474 | 474 | ||
475 | pipelineSchema = do | 475 | pipelineSchema = do |
476 | data_ "StreamType" $ do | 476 | data_ "StreamType" $ do |
diff --git a/ddl/out/LambdaCube.IR.cpp b/ddl/out/LambdaCube.IR.cpp index 335a512..67e5f0d 100644 --- a/ddl/out/LambdaCube.IR.cpp +++ b/ddl/out/LambdaCube.IR.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:12.941660000000Z | 2 | // 2016-02-26T10:42:56.948155000000Z |
3 | 3 | ||
4 | #include "LambdaCube.IR.hpp" | 4 | #include "LambdaCube.IR.hpp" |
5 | template<> json toJSON<std::shared_ptr<ArrayValue>>(std::shared_ptr<ArrayValue> &v) { | 5 | template<> json toJSON<std::shared_ptr<ArrayValue>>(std::shared_ptr<ArrayValue> &v) { |
diff --git a/ddl/out/LambdaCube.IR.hpp b/ddl/out/LambdaCube.IR.hpp index 06e5835..fa8f583 100644 --- a/ddl/out/LambdaCube.IR.hpp +++ b/ddl/out/LambdaCube.IR.hpp | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:12.941660000000Z | 2 | // 2016-02-26T10:42:56.948155000000Z |
3 | 3 | ||
4 | #ifndef HEADER_LambdaCube.IR_H | 4 | #ifndef HEADER_LambdaCube.IR_H |
5 | #define HEADER_LambdaCube.IR_H | 5 | #define HEADER_LambdaCube.IR_H |
diff --git a/ddl/out/LambdaCube.IR.hs b/ddl/out/LambdaCube.IR.hs index fdf8116..b1ab3ce 100644 --- a/ddl/out/LambdaCube.IR.hs +++ b/ddl/out/LambdaCube.IR.hs | |||
@@ -1,5 +1,5 @@ | |||
1 | -- generated file, do not modify! | 1 | -- generated file, do not modify! |
2 | -- 2016-02-12T16:05:12.941660000000Z | 2 | -- 2016-02-26T10:42:56.948155000000Z |
3 | 3 | ||
4 | {-# LANGUAGE OverloadedStrings, RecordWildCards #-} | 4 | {-# LANGUAGE OverloadedStrings, RecordWildCards #-} |
5 | module LambdaCube.IR where | 5 | module LambdaCube.IR where |
diff --git a/ddl/out/LambdaCube.IR.purs b/ddl/out/LambdaCube.IR.purs index f62464e..f21a121 100644 --- a/ddl/out/LambdaCube.IR.purs +++ b/ddl/out/LambdaCube.IR.purs | |||
@@ -1,5 +1,5 @@ | |||
1 | -- generated file, do not modify! | 1 | -- generated file, do not modify! |
2 | -- 2016-02-12T16:05:12.941660000000Z | 2 | -- 2016-02-26T10:42:56.948155000000Z |
3 | 3 | ||
4 | module LambdaCube.IR where | 4 | module LambdaCube.IR where |
5 | import Prelude | 5 | import Prelude |
diff --git a/ddl/out/LambdaCube.IR.swift b/ddl/out/LambdaCube.IR.swift index 2dd9300..2b55d76 100644 --- a/ddl/out/LambdaCube.IR.swift +++ b/ddl/out/LambdaCube.IR.swift | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:12.941660000000Z | 2 | // 2016-02-26T10:42:56.948155000000Z |
3 | 3 | ||
4 | typealias StreamName = Int | 4 | typealias StreamName = Int |
5 | 5 | ||
diff --git a/ddl/out/LambdaCube.IR2.hpp b/ddl/out/LambdaCube.IR2.hpp index d353460..cad7c73 100644 --- a/ddl/out/LambdaCube.IR2.hpp +++ b/ddl/out/LambdaCube.IR2.hpp | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:12.941660000000Z | 2 | // 2016-02-26T10:42:56.948155000000Z |
3 | 3 | ||
4 | #ifndef HEADER_LambdaCube.IR_H | 4 | #ifndef HEADER_LambdaCube.IR_H |
5 | #define HEADER_LambdaCube.IR_H | 5 | #define HEADER_LambdaCube.IR_H |
diff --git a/ddl/out/LambdaCube.Mesh.cpp b/ddl/out/LambdaCube.Mesh.cpp index 9e704e1..a2e34cb 100644 --- a/ddl/out/LambdaCube.Mesh.cpp +++ b/ddl/out/LambdaCube.Mesh.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.332951000000Z | 2 | // 2016-02-26T10:42:57.342809000000Z |
3 | 3 | ||
4 | #include "LambdaCube.Mesh.hpp" | 4 | #include "LambdaCube.Mesh.hpp" |
5 | template<> json toJSON<std::shared_ptr<MeshAttribute>>(std::shared_ptr<MeshAttribute> &v) { | 5 | template<> json toJSON<std::shared_ptr<MeshAttribute>>(std::shared_ptr<MeshAttribute> &v) { |
diff --git a/ddl/out/LambdaCube.Mesh.hpp b/ddl/out/LambdaCube.Mesh.hpp index b93ec58..383ccea 100644 --- a/ddl/out/LambdaCube.Mesh.hpp +++ b/ddl/out/LambdaCube.Mesh.hpp | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.332951000000Z | 2 | // 2016-02-26T10:42:57.342809000000Z |
3 | 3 | ||
4 | #ifndef HEADER_LambdaCube.Mesh_H | 4 | #ifndef HEADER_LambdaCube.Mesh_H |
5 | #define HEADER_LambdaCube.Mesh_H | 5 | #define HEADER_LambdaCube.Mesh_H |
diff --git a/ddl/out/LambdaCube.Mesh.hs b/ddl/out/LambdaCube.Mesh.hs index da937f3..340570e 100644 --- a/ddl/out/LambdaCube.Mesh.hs +++ b/ddl/out/LambdaCube.Mesh.hs | |||
@@ -1,5 +1,5 @@ | |||
1 | -- generated file, do not modify! | 1 | -- generated file, do not modify! |
2 | -- 2016-02-12T16:05:13.332951000000Z | 2 | -- 2016-02-26T10:42:57.342809000000Z |
3 | 3 | ||
4 | {-# LANGUAGE OverloadedStrings, RecordWildCards #-} | 4 | {-# LANGUAGE OverloadedStrings, RecordWildCards #-} |
5 | module LambdaCube.Mesh where | 5 | module LambdaCube.Mesh where |
diff --git a/ddl/out/LambdaCube.Mesh.purs b/ddl/out/LambdaCube.Mesh.purs index d418ac2..517d76b 100644 --- a/ddl/out/LambdaCube.Mesh.purs +++ b/ddl/out/LambdaCube.Mesh.purs | |||
@@ -1,5 +1,5 @@ | |||
1 | -- generated file, do not modify! | 1 | -- generated file, do not modify! |
2 | -- 2016-02-12T16:05:13.332951000000Z | 2 | -- 2016-02-26T10:42:57.342809000000Z |
3 | 3 | ||
4 | module LambdaCube.Mesh where | 4 | module LambdaCube.Mesh where |
5 | import Prelude | 5 | import Prelude |
diff --git a/ddl/out/LambdaCube.Mesh.swift b/ddl/out/LambdaCube.Mesh.swift index 82c8ba5..d469011 100644 --- a/ddl/out/LambdaCube.Mesh.swift +++ b/ddl/out/LambdaCube.Mesh.swift | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.332951000000Z | 2 | // 2016-02-26T10:42:57.342809000000Z |
3 | 3 | ||
4 | enum MeshAttribute { | 4 | enum MeshAttribute { |
5 | case A_Float(Array<Float>) | 5 | case A_Float(Array<Float>) |
diff --git a/ddl/out/LambdaCube.Mesh2.hpp b/ddl/out/LambdaCube.Mesh2.hpp index a6a7cfe..855fafa 100644 --- a/ddl/out/LambdaCube.Mesh2.hpp +++ b/ddl/out/LambdaCube.Mesh2.hpp | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.332951000000Z | 2 | // 2016-02-26T10:42:57.342809000000Z |
3 | 3 | ||
4 | #ifndef HEADER_LambdaCube.Mesh_H | 4 | #ifndef HEADER_LambdaCube.Mesh_H |
5 | #define HEADER_LambdaCube.Mesh_H | 5 | #define HEADER_LambdaCube.Mesh_H |
diff --git a/ddl/out/LambdaCube.PipelineSchema.cpp b/ddl/out/LambdaCube.PipelineSchema.cpp index 283aa31..9161ceb 100644 --- a/ddl/out/LambdaCube.PipelineSchema.cpp +++ b/ddl/out/LambdaCube.PipelineSchema.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.310528000000Z | 2 | // 2016-02-26T10:42:57.323154000000Z |
3 | 3 | ||
4 | #include "LambdaCube.PipelineSchema.hpp" | 4 | #include "LambdaCube.PipelineSchema.hpp" |
5 | template<> json toJSON<std::shared_ptr<StreamType>>(std::shared_ptr<StreamType> &v) { | 5 | template<> json toJSON<std::shared_ptr<StreamType>>(std::shared_ptr<StreamType> &v) { |
diff --git a/ddl/out/LambdaCube.PipelineSchema.hpp b/ddl/out/LambdaCube.PipelineSchema.hpp index 68b309f..4ed14d4 100644 --- a/ddl/out/LambdaCube.PipelineSchema.hpp +++ b/ddl/out/LambdaCube.PipelineSchema.hpp | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.310528000000Z | 2 | // 2016-02-26T10:42:57.323154000000Z |
3 | 3 | ||
4 | #ifndef HEADER_LambdaCube.PipelineSchema_H | 4 | #ifndef HEADER_LambdaCube.PipelineSchema_H |
5 | #define HEADER_LambdaCube.PipelineSchema_H | 5 | #define HEADER_LambdaCube.PipelineSchema_H |
diff --git a/ddl/out/LambdaCube.PipelineSchema.hs b/ddl/out/LambdaCube.PipelineSchema.hs index a573d27..5f6822b 100644 --- a/ddl/out/LambdaCube.PipelineSchema.hs +++ b/ddl/out/LambdaCube.PipelineSchema.hs | |||
@@ -1,5 +1,5 @@ | |||
1 | -- generated file, do not modify! | 1 | -- generated file, do not modify! |
2 | -- 2016-02-12T16:05:13.310528000000Z | 2 | -- 2016-02-26T10:42:57.323154000000Z |
3 | 3 | ||
4 | {-# LANGUAGE OverloadedStrings, RecordWildCards #-} | 4 | {-# LANGUAGE OverloadedStrings, RecordWildCards #-} |
5 | module LambdaCube.PipelineSchema where | 5 | module LambdaCube.PipelineSchema where |
diff --git a/ddl/out/LambdaCube.PipelineSchema.purs b/ddl/out/LambdaCube.PipelineSchema.purs index b31416b..258744a 100644 --- a/ddl/out/LambdaCube.PipelineSchema.purs +++ b/ddl/out/LambdaCube.PipelineSchema.purs | |||
@@ -1,5 +1,5 @@ | |||
1 | -- generated file, do not modify! | 1 | -- generated file, do not modify! |
2 | -- 2016-02-12T16:05:13.310528000000Z | 2 | -- 2016-02-26T10:42:57.323154000000Z |
3 | 3 | ||
4 | module LambdaCube.PipelineSchema where | 4 | module LambdaCube.PipelineSchema where |
5 | import Prelude | 5 | import Prelude |
diff --git a/ddl/out/LambdaCube.PipelineSchema.swift b/ddl/out/LambdaCube.PipelineSchema.swift index 542e8e2..6019917 100644 --- a/ddl/out/LambdaCube.PipelineSchema.swift +++ b/ddl/out/LambdaCube.PipelineSchema.swift | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.310528000000Z | 2 | // 2016-02-26T10:42:57.323154000000Z |
3 | 3 | ||
4 | enum StreamType { | 4 | enum StreamType { |
5 | case Attribute_Word | 5 | case Attribute_Word |
diff --git a/ddl/out/LambdaCube.PipelineSchema2.hpp b/ddl/out/LambdaCube.PipelineSchema2.hpp index 153a9f6..fbf04ff 100644 --- a/ddl/out/LambdaCube.PipelineSchema2.hpp +++ b/ddl/out/LambdaCube.PipelineSchema2.hpp | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.310528000000Z | 2 | // 2016-02-26T10:42:57.323154000000Z |
3 | 3 | ||
4 | #ifndef HEADER_LambdaCube.PipelineSchema_H | 4 | #ifndef HEADER_LambdaCube.PipelineSchema_H |
5 | #define HEADER_LambdaCube.PipelineSchema_H | 5 | #define HEADER_LambdaCube.PipelineSchema_H |
diff --git a/ddl/out/LambdaCube.TypeInfo.cpp b/ddl/out/LambdaCube.TypeInfo.cpp index ce2dcff..643afda 100644 --- a/ddl/out/LambdaCube.TypeInfo.cpp +++ b/ddl/out/LambdaCube.TypeInfo.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.364534000000Z | 2 | // 2016-02-26T10:42:57.376331000000Z |
3 | 3 | ||
4 | #include "LambdaCube.TypeInfo.hpp" | 4 | #include "LambdaCube.TypeInfo.hpp" |
5 | template<> json toJSON<std::shared_ptr<TypeInfo>>(std::shared_ptr<TypeInfo> &v) { | 5 | template<> json toJSON<std::shared_ptr<TypeInfo>>(std::shared_ptr<TypeInfo> &v) { |
@@ -39,21 +39,21 @@ template<> std::shared_ptr<TypeInfo> fromJSON<std::shared_ptr<TypeInfo>>(W<std:: | |||
39 | return o; | 39 | return o; |
40 | } | 40 | } |
41 | 41 | ||
42 | template<> json toJSON<std::shared_ptr<MyEither>>(std::shared_ptr<MyEither> &v) { | 42 | template<> json toJSON<std::shared_ptr<CompileResult>>(std::shared_ptr<CompileResult> &v) { |
43 | json obj({}); | 43 | json obj({}); |
44 | switch (v->tag) { | 44 | switch (v->tag) { |
45 | case ::MyEither::tag::MyLeft: | 45 | case ::CompileResult::tag::CompileError: |
46 | obj["tag"] = "MyLeft"; | 46 | obj["tag"] = "CompileError"; |
47 | { | 47 | { |
48 | std::shared_ptr<data::MyLeft> tv = std::static_pointer_cast<data::MyLeft>(v); | 48 | std::shared_ptr<data::CompileError> tv = std::static_pointer_cast<data::CompileError>(v); |
49 | obj["arg0"] = toJSON(tv->_0); | 49 | obj["arg0"] = toJSON(tv->_0); |
50 | obj["arg1"] = toJSON(tv->_1); | 50 | obj["arg1"] = toJSON(tv->_1); |
51 | } | 51 | } |
52 | break; | 52 | break; |
53 | case ::MyEither::tag::MyRight: | 53 | case ::CompileResult::tag::Compiled: |
54 | obj["tag"] = "MyRight"; | 54 | obj["tag"] = "Compiled"; |
55 | { | 55 | { |
56 | std::shared_ptr<data::MyRight> tv = std::static_pointer_cast<data::MyRight>(v); | 56 | std::shared_ptr<data::Compiled> tv = std::static_pointer_cast<data::Compiled>(v); |
57 | obj["arg0"] = toJSON(tv->_0); | 57 | obj["arg0"] = toJSON(tv->_0); |
58 | obj["arg1"] = toJSON(tv->_1); | 58 | obj["arg1"] = toJSON(tv->_1); |
59 | obj["arg2"] = toJSON(tv->_2); | 59 | obj["arg2"] = toJSON(tv->_2); |
@@ -63,26 +63,26 @@ template<> json toJSON<std::shared_ptr<MyEither>>(std::shared_ptr<MyEither> &v) | |||
63 | return obj; | 63 | return obj; |
64 | } | 64 | } |
65 | 65 | ||
66 | template<> std::shared_ptr<MyEither> fromJSON<std::shared_ptr<MyEither>>(W<std::shared_ptr<MyEither>> v, json &obj) { | 66 | template<> std::shared_ptr<CompileResult> fromJSON<std::shared_ptr<CompileResult>>(W<std::shared_ptr<CompileResult>> v, json &obj) { |
67 | enum ::MyEither::tag tagType; | 67 | enum ::CompileResult::tag tagType; |
68 | std::string tag = obj["tag"]; | 68 | std::string tag = obj["tag"]; |
69 | if (tag == "MyLeft") { | 69 | if (tag == "CompileError") { |
70 | tagType = ::MyEither::tag::MyLeft; | 70 | tagType = ::CompileResult::tag::CompileError; |
71 | std::shared_ptr<data::MyLeft> tv(new data::MyLeft()); | 71 | std::shared_ptr<data::CompileError> tv(new data::CompileError()); |
72 | tv->_0 = fromJSON(W<std::shared_ptr<::TypeInfo>>(), obj["arg0"]); | 72 | tv->_0 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg0"]); |
73 | tv->_1 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg1"]); | 73 | tv->_1 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg1"]); |
74 | return tv; | 74 | return tv; |
75 | } | 75 | } |
76 | else if (tag == "MyRight") { | 76 | else if (tag == "Compiled") { |
77 | tagType = ::MyEither::tag::MyRight; | 77 | tagType = ::CompileResult::tag::Compiled; |
78 | std::shared_ptr<data::MyRight> tv(new data::MyRight()); | 78 | std::shared_ptr<data::Compiled> tv(new data::Compiled()); |
79 | tv->_0 = fromJSON(W<String>(), obj["arg0"]); | 79 | tv->_0 = fromJSON(W<String>(), obj["arg0"]); |
80 | tv->_1 = fromJSON(W<std::shared_ptr<::Pipeline>>(), obj["arg1"]); | 80 | tv->_1 = fromJSON(W<std::shared_ptr<::Pipeline>>(), obj["arg1"]); |
81 | tv->_2 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg2"]); | 81 | tv->_2 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg2"]); |
82 | return tv; | 82 | return tv; |
83 | } | 83 | } |
84 | else throw "unknown constructor: " + tag; | 84 | else throw "unknown constructor: " + tag; |
85 | std::shared_ptr<::MyEither> o(new ::MyEither()); | 85 | std::shared_ptr<::CompileResult> o(new ::CompileResult()); |
86 | o->tag = tagType; | 86 | o->tag = tagType; |
87 | return o; | 87 | return o; |
88 | } | 88 | } |
diff --git a/ddl/out/LambdaCube.TypeInfo.hpp b/ddl/out/LambdaCube.TypeInfo.hpp index 6e302f3..dd6b023 100644 --- a/ddl/out/LambdaCube.TypeInfo.hpp +++ b/ddl/out/LambdaCube.TypeInfo.hpp | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.364534000000Z | 2 | // 2016-02-26T10:42:57.376331000000Z |
3 | 3 | ||
4 | #ifndef HEADER_LambdaCube.TypeInfo_H | 4 | #ifndef HEADER_LambdaCube.TypeInfo_H |
5 | #define HEADER_LambdaCube.TypeInfo_H | 5 | #define HEADER_LambdaCube.TypeInfo_H |
@@ -25,26 +25,26 @@ namespace data { | |||
25 | TypeInfo() { tag = tag::TypeInfo; } | 25 | TypeInfo() { tag = tag::TypeInfo; } |
26 | }; | 26 | }; |
27 | } | 27 | } |
28 | class MyEither { | 28 | class CompileResult { |
29 | public: | 29 | public: |
30 | enum class tag { | 30 | enum class tag { |
31 | MyLeft, | 31 | CompileError, |
32 | MyRight | 32 | Compiled |
33 | } tag; | 33 | } tag; |
34 | }; | 34 | }; |
35 | namespace data { | 35 | namespace data { |
36 | class MyLeft : public ::MyEither { | 36 | class CompileError : public ::CompileResult { |
37 | public: | 37 | public: |
38 | std::shared_ptr<::TypeInfo> _0; | 38 | std::vector<std::shared_ptr<::TypeInfo>> _0; |
39 | std::vector<std::shared_ptr<::TypeInfo>> _1; | 39 | std::vector<std::shared_ptr<::TypeInfo>> _1; |
40 | MyLeft() { tag = tag::MyLeft; } | 40 | CompileError() { tag = tag::CompileError; } |
41 | }; | 41 | }; |
42 | class MyRight : public ::MyEither { | 42 | class Compiled : public ::CompileResult { |
43 | public: | 43 | public: |
44 | String _0; | 44 | String _0; |
45 | std::shared_ptr<::Pipeline> _1; | 45 | std::shared_ptr<::Pipeline> _1; |
46 | std::vector<std::shared_ptr<::TypeInfo>> _2; | 46 | std::vector<std::shared_ptr<::TypeInfo>> _2; |
47 | MyRight() { tag = tag::MyRight; } | 47 | Compiled() { tag = tag::Compiled; } |
48 | }; | 48 | }; |
49 | } | 49 | } |
50 | #endif | 50 | #endif |
diff --git a/ddl/out/LambdaCube.TypeInfo.hs b/ddl/out/LambdaCube.TypeInfo.hs index a2df59c..f23bd83 100644 --- a/ddl/out/LambdaCube.TypeInfo.hs +++ b/ddl/out/LambdaCube.TypeInfo.hs | |||
@@ -1,5 +1,5 @@ | |||
1 | -- generated file, do not modify! | 1 | -- generated file, do not modify! |
2 | -- 2016-02-12T16:05:13.364534000000Z | 2 | -- 2016-02-26T10:42:57.376331000000Z |
3 | 3 | ||
4 | {-# LANGUAGE OverloadedStrings, RecordWildCards #-} | 4 | {-# LANGUAGE OverloadedStrings, RecordWildCards #-} |
5 | module LambdaCube.TypeInfo where | 5 | module LambdaCube.TypeInfo where |
@@ -28,9 +28,9 @@ data TypeInfo | |||
28 | 28 | ||
29 | deriving (Show, Eq, Ord) | 29 | deriving (Show, Eq, Ord) |
30 | 30 | ||
31 | data MyEither | 31 | data CompileResult |
32 | = MyLeft TypeInfo (Vector TypeInfo) | 32 | = CompileError (Vector TypeInfo) (Vector TypeInfo) |
33 | | MyRight String Pipeline (Vector TypeInfo) | 33 | | Compiled String Pipeline (Vector TypeInfo) |
34 | deriving (Show, Eq, Ord) | 34 | deriving (Show, Eq, Ord) |
35 | 35 | ||
36 | 36 | ||
@@ -64,16 +64,16 @@ instance FromJSON TypeInfo where | |||
64 | } | 64 | } |
65 | parseJSON _ = mzero | 65 | parseJSON _ = mzero |
66 | 66 | ||
67 | instance ToJSON MyEither where | 67 | instance ToJSON CompileResult where |
68 | toJSON v = case v of | 68 | toJSON v = case v of |
69 | MyLeft arg0 arg1 -> object [ "tag" .= ("MyLeft" :: Text), "arg0" .= arg0, "arg1" .= arg1] | 69 | CompileError arg0 arg1 -> object [ "tag" .= ("CompileError" :: Text), "arg0" .= arg0, "arg1" .= arg1] |
70 | MyRight arg0 arg1 arg2 -> object [ "tag" .= ("MyRight" :: Text), "arg0" .= arg0, "arg1" .= arg1, "arg2" .= arg2] | 70 | Compiled arg0 arg1 arg2 -> object [ "tag" .= ("Compiled" :: Text), "arg0" .= arg0, "arg1" .= arg1, "arg2" .= arg2] |
71 | 71 | ||
72 | instance FromJSON MyEither where | 72 | instance FromJSON CompileResult where |
73 | parseJSON (Object obj) = do | 73 | parseJSON (Object obj) = do |
74 | tag <- obj .: "tag" | 74 | tag <- obj .: "tag" |
75 | case tag :: Text of | 75 | case tag :: Text of |
76 | "MyLeft" -> MyLeft <$> obj .: "arg0" <*> obj .: "arg1" | 76 | "CompileError" -> CompileError <$> obj .: "arg0" <*> obj .: "arg1" |
77 | "MyRight" -> MyRight <$> obj .: "arg0" <*> obj .: "arg1" <*> obj .: "arg2" | 77 | "Compiled" -> Compiled <$> obj .: "arg0" <*> obj .: "arg1" <*> obj .: "arg2" |
78 | parseJSON _ = mzero | 78 | parseJSON _ = mzero |
79 | 79 | ||
diff --git a/ddl/out/LambdaCube.TypeInfo.purs b/ddl/out/LambdaCube.TypeInfo.purs index afd8a86..3252a7f 100644 --- a/ddl/out/LambdaCube.TypeInfo.purs +++ b/ddl/out/LambdaCube.TypeInfo.purs | |||
@@ -1,5 +1,5 @@ | |||
1 | -- generated file, do not modify! | 1 | -- generated file, do not modify! |
2 | -- 2016-02-12T16:05:13.364534000000Z | 2 | -- 2016-02-26T10:42:57.376331000000Z |
3 | 3 | ||
4 | module LambdaCube.TypeInfo where | 4 | module LambdaCube.TypeInfo where |
5 | import Prelude | 5 | import Prelude |
@@ -28,9 +28,9 @@ data TypeInfo | |||
28 | } | 28 | } |
29 | 29 | ||
30 | 30 | ||
31 | data MyEither | 31 | data CompileResult |
32 | = MyLeft TypeInfo (Array TypeInfo) | 32 | = CompileError (Array TypeInfo) (Array TypeInfo) |
33 | | MyRight String Pipeline (Array TypeInfo) | 33 | | Compiled String Pipeline (Array TypeInfo) |
34 | 34 | ||
35 | 35 | ||
36 | 36 | ||
@@ -64,16 +64,16 @@ instance decodeJsonTypeInfo :: DecodeJson TypeInfo where | |||
64 | , text:text | 64 | , text:text |
65 | } | 65 | } |
66 | 66 | ||
67 | instance encodeJsonMyEither :: EncodeJson MyEither where | 67 | instance encodeJsonCompileResult :: EncodeJson CompileResult where |
68 | encodeJson v = case v of | 68 | encodeJson v = case v of |
69 | MyLeft arg0 arg1 -> "tag" := "MyLeft" ~> "arg0" := arg0 ~> "arg1" := arg1 ~> jsonEmptyObject | 69 | CompileError arg0 arg1 -> "tag" := "CompileError" ~> "arg0" := arg0 ~> "arg1" := arg1 ~> jsonEmptyObject |
70 | MyRight arg0 arg1 arg2 -> "tag" := "MyRight" ~> "arg0" := arg0 ~> "arg1" := arg1 ~> "arg2" := arg2 ~> jsonEmptyObject | 70 | Compiled arg0 arg1 arg2 -> "tag" := "Compiled" ~> "arg0" := arg0 ~> "arg1" := arg1 ~> "arg2" := arg2 ~> jsonEmptyObject |
71 | 71 | ||
72 | instance decodeJsonMyEither :: DecodeJson MyEither where | 72 | instance decodeJsonCompileResult :: DecodeJson CompileResult where |
73 | decodeJson json = do | 73 | decodeJson json = do |
74 | obj <- decodeJson json | 74 | obj <- decodeJson json |
75 | tag <- obj .? "tag" | 75 | tag <- obj .? "tag" |
76 | case tag of | 76 | case tag of |
77 | "MyLeft" -> MyLeft <$> obj .? "arg0" <*> obj .? "arg1" | 77 | "CompileError" -> CompileError <$> obj .? "arg0" <*> obj .? "arg1" |
78 | "MyRight" -> MyRight <$> obj .? "arg0" <*> obj .? "arg1" <*> obj .? "arg2" | 78 | "Compiled" -> Compiled <$> obj .? "arg0" <*> obj .? "arg1" <*> obj .? "arg2" |
79 | 79 | ||
diff --git a/ddl/out/LambdaCube.TypeInfo.swift b/ddl/out/LambdaCube.TypeInfo.swift index d3b03d1..2e2fb0f 100644 --- a/ddl/out/LambdaCube.TypeInfo.swift +++ b/ddl/out/LambdaCube.TypeInfo.swift | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.364534000000Z | 2 | // 2016-02-26T10:42:57.376331000000Z |
3 | 3 | ||
4 | enum TypeInfo { | 4 | enum TypeInfo { |
5 | case TypeInfo(TypeInfo_Data) | 5 | case TypeInfo(TypeInfo_Data) |
@@ -12,9 +12,9 @@ enum TypeInfo { | |||
12 | } | 12 | } |
13 | } | 13 | } |
14 | 14 | ||
15 | enum MyEither { | 15 | enum CompileResult { |
16 | case MyLeft(TypeInfo,Array<TypeInfo>) | 16 | case CompileError(Array<TypeInfo>,Array<TypeInfo>) |
17 | case MyRight(String,Pipeline,Array<TypeInfo>) | 17 | case Compiled(String,Pipeline,Array<TypeInfo>) |
18 | } | 18 | } |
19 | 19 | ||
20 | 20 | ||
@@ -85,13 +85,13 @@ extension TypeInfo { | |||
85 | } | 85 | } |
86 | } | 86 | } |
87 | } | 87 | } |
88 | extension MyEither { | 88 | extension CompileResult { |
89 | var toJSON : [String: AnyObject] { | 89 | var toJSON : [String: AnyObject] { |
90 | switch self { | 90 | switch self { |
91 | case .MyLeft(let arg0, let arg1): | 91 | case .CompileError(let arg0, let arg1): |
92 | return [ "tag" : "MyLeft", "arg0" : arg0.toJSON, "arg1" : arg1.toJSON] | 92 | return [ "tag" : "CompileError", "arg0" : arg0.toJSON, "arg1" : arg1.toJSON] |
93 | case .MyRight(let arg0, let arg1, let arg2): | 93 | case .Compiled(let arg0, let arg1, let arg2): |
94 | return [ "tag" : "MyRight", "arg0" : arg0.toJSON, "arg1" : arg1.toJSON, "arg2" : arg2.toJSON] | 94 | return [ "tag" : "Compiled", "arg0" : arg0.toJSON, "arg1" : arg1.toJSON, "arg2" : arg2.toJSON] |
95 | } | 95 | } |
96 | } | 96 | } |
97 | } | 97 | } |
@@ -114,7 +114,7 @@ enum Type { | |||
114 | case Maybe(Type) | 114 | case Maybe(Type) |
115 | case Map(Type,Type) | 115 | case Map(Type,Type) |
116 | case TypeInfo | 116 | case TypeInfo |
117 | case MyEither | 117 | case CompileResult |
118 | } | 118 | } |
119 | 119 | ||
120 | func fromJSON(type: Type, personName: String) -> Any { | 120 | func fromJSON(type: Type, personName: String) -> Any { |
diff --git a/ddl/out/LambdaCube.TypeInfo2.hpp b/ddl/out/LambdaCube.TypeInfo2.hpp index c6d5f4b..cffe5ea 100644 --- a/ddl/out/LambdaCube.TypeInfo2.hpp +++ b/ddl/out/LambdaCube.TypeInfo2.hpp | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.364534000000Z | 2 | // 2016-02-26T10:42:57.376331000000Z |
3 | 3 | ||
4 | #ifndef HEADER_LambdaCube.TypeInfo_H | 4 | #ifndef HEADER_LambdaCube.TypeInfo_H |
5 | #define HEADER_LambdaCube.TypeInfo_H | 5 | #define HEADER_LambdaCube.TypeInfo_H |
@@ -26,25 +26,25 @@ public: | |||
26 | std::shared_ptr<data::TypeInfo> TypeInfo; | 26 | std::shared_ptr<data::TypeInfo> TypeInfo; |
27 | }; | 27 | }; |
28 | namespace data { | 28 | namespace data { |
29 | class MyLeft { | 29 | class CompileError { |
30 | public: | 30 | public: |
31 | std::shared_ptr<::TypeInfo> _0; | 31 | std::vector<std::shared_ptr<::TypeInfo>> _0; |
32 | std::vector<std::shared_ptr<::TypeInfo>> _1; | 32 | std::vector<std::shared_ptr<::TypeInfo>> _1; |
33 | }; | 33 | }; |
34 | class MyRight { | 34 | class Compiled { |
35 | public: | 35 | public: |
36 | String _0; | 36 | String _0; |
37 | std::shared_ptr<::Pipeline> _1; | 37 | std::shared_ptr<::Pipeline> _1; |
38 | std::vector<std::shared_ptr<::TypeInfo>> _2; | 38 | std::vector<std::shared_ptr<::TypeInfo>> _2; |
39 | }; | 39 | }; |
40 | } | 40 | } |
41 | class MyEither { | 41 | class CompileResult { |
42 | public: | 42 | public: |
43 | enum class tag { | 43 | enum class tag { |
44 | MyLeft, | 44 | CompileError, |
45 | MyRight | 45 | Compiled |
46 | } tag; | 46 | } tag; |
47 | std::shared_ptr<data::MyLeft> MyLeft; | 47 | std::shared_ptr<data::CompileError> CompileError; |
48 | std::shared_ptr<data::MyRight> MyRight; | 48 | std::shared_ptr<data::Compiled> Compiled; |
49 | }; | 49 | }; |
50 | #endif | 50 | #endif |
diff --git a/ddl/out/TestData.cpp b/ddl/out/TestData.cpp index 558a45b..5eaf158 100644 --- a/ddl/out/TestData.cpp +++ b/ddl/out/TestData.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.383716000000Z | 2 | // 2016-02-26T10:42:57.396138000000Z |
3 | 3 | ||
4 | #include "TestData.hpp" | 4 | #include "TestData.hpp" |
5 | template<> json toJSON<std::shared_ptr<ClientInfo>>(std::shared_ptr<ClientInfo> &v) { | 5 | template<> json toJSON<std::shared_ptr<ClientInfo>>(std::shared_ptr<ClientInfo> &v) { |
diff --git a/ddl/out/TestData.hpp b/ddl/out/TestData.hpp index 39aa824..8aa75cd 100644 --- a/ddl/out/TestData.hpp +++ b/ddl/out/TestData.hpp | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.383716000000Z | 2 | // 2016-02-26T10:42:57.396138000000Z |
3 | 3 | ||
4 | #ifndef HEADER_TestData_H | 4 | #ifndef HEADER_TestData_H |
5 | #define HEADER_TestData_H | 5 | #define HEADER_TestData_H |
diff --git a/ddl/out/TestData.hs b/ddl/out/TestData.hs index d6d8e38..6c17fc9 100644 --- a/ddl/out/TestData.hs +++ b/ddl/out/TestData.hs | |||
@@ -1,5 +1,5 @@ | |||
1 | -- generated file, do not modify! | 1 | -- generated file, do not modify! |
2 | -- 2016-02-12T16:05:13.383716000000Z | 2 | -- 2016-02-26T10:42:57.396138000000Z |
3 | 3 | ||
4 | {-# LANGUAGE OverloadedStrings, RecordWildCards #-} | 4 | {-# LANGUAGE OverloadedStrings, RecordWildCards #-} |
5 | module TestData where | 5 | module TestData where |
diff --git a/ddl/out/TestData.purs b/ddl/out/TestData.purs index 426da42..2fa0812 100644 --- a/ddl/out/TestData.purs +++ b/ddl/out/TestData.purs | |||
@@ -1,5 +1,5 @@ | |||
1 | -- generated file, do not modify! | 1 | -- generated file, do not modify! |
2 | -- 2016-02-12T16:05:13.383716000000Z | 2 | -- 2016-02-26T10:42:57.396138000000Z |
3 | 3 | ||
4 | module TestData where | 4 | module TestData where |
5 | import Prelude | 5 | import Prelude |
diff --git a/ddl/out/TestData.swift b/ddl/out/TestData.swift index 671c6bf..875f73c 100644 --- a/ddl/out/TestData.swift +++ b/ddl/out/TestData.swift | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.383716000000Z | 2 | // 2016-02-26T10:42:57.396138000000Z |
3 | 3 | ||
4 | enum ClientInfo { | 4 | enum ClientInfo { |
5 | case ClientInfo(ClientInfo_Data) | 5 | case ClientInfo(ClientInfo_Data) |
diff --git a/ddl/out/TestData2.hpp b/ddl/out/TestData2.hpp index e876551..0fa5e60 100644 --- a/ddl/out/TestData2.hpp +++ b/ddl/out/TestData2.hpp | |||
@@ -1,5 +1,5 @@ | |||
1 | // generated file, do not modify! | 1 | // generated file, do not modify! |
2 | // 2016-02-12T16:05:13.383716000000Z | 2 | // 2016-02-26T10:42:57.396138000000Z |
3 | 3 | ||
4 | #ifndef HEADER_TestData_H | 4 | #ifndef HEADER_TestData_H |
5 | #define HEADER_TestData_H | 5 | #define HEADER_TestData_H |