summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCsaba Hruska <csaba.hruska@gmail.com>2016-01-18 15:50:24 +0100
committerCsaba Hruska <csaba.hruska@gmail.com>2016-01-18 15:50:32 +0100
commit0c885c5c6bfb69c543635fd08d697ce44f24642d (patch)
tree2b9b2948e8da4eacf8f2599cefc76b43e57f399e
parentd80c6be607d0323b71b9da07dde47116b1c5ac39 (diff)
send pipeline source in TypeInfo
-rw-r--r--ddl/Definitions.hs2
-rw-r--r--ddl/out/IR.cpp2
-rw-r--r--ddl/out/IR.hpp2
-rw-r--r--ddl/out/IR.hs2
-rw-r--r--ddl/out/IR.purs2
-rw-r--r--ddl/out/IR.swift2
-rw-r--r--ddl/out/IR2.hpp2
-rw-r--r--ddl/out/Mesh.cpp2
-rw-r--r--ddl/out/Mesh.hpp2
-rw-r--r--ddl/out/Mesh.hs2
-rw-r--r--ddl/out/Mesh.purs2
-rw-r--r--ddl/out/Mesh.swift2
-rw-r--r--ddl/out/Mesh2.hpp2
-rw-r--r--ddl/out/TypeInfo.cpp8
-rw-r--r--ddl/out/TypeInfo.hpp7
-rw-r--r--ddl/out/TypeInfo.hs8
-rw-r--r--ddl/out/TypeInfo.purs8
-rw-r--r--ddl/out/TypeInfo.swift8
-rw-r--r--ddl/out/TypeInfo2.hpp7
19 files changed, 38 insertions, 34 deletions
diff --git a/ddl/Definitions.hs b/ddl/Definitions.hs
index 9618407..53930ef 100644
--- a/ddl/Definitions.hs
+++ b/ddl/Definitions.hs
@@ -469,7 +469,7 @@ typeInfo = do
469 469
470 data_ "MyEither" $ do 470 data_ "MyEither" $ do
471 const_ "MyLeft" ["TypeInfo", Array "TypeInfo"] 471 const_ "MyLeft" ["TypeInfo", Array "TypeInfo"]
472 const_ "MyRight" ["Pipeline", Array "TypeInfo"] 472 const_ "MyRight" [String, "Pipeline", Array "TypeInfo"]
473 473
474modules = do 474modules = do
475 module_ "IR" ir 475 module_ "IR" ir
diff --git a/ddl/out/IR.cpp b/ddl/out/IR.cpp
index 729bdd9..cac97e7 100644
--- a/ddl/out/IR.cpp
+++ b/ddl/out/IR.cpp
@@ -1,5 +1,5 @@
1// generated file, do not modify! 1// generated file, do not modify!
2// 2015-12-21T12:00:19.420877000000Z 2// 2016-01-18T14:30:07.798481Z
3 3
4#include "IR.hpp" 4#include "IR.hpp"
5template<> json toJSON<std::shared_ptr<ArrayValue>>(std::shared_ptr<ArrayValue> &v) { 5template<> json toJSON<std::shared_ptr<ArrayValue>>(std::shared_ptr<ArrayValue> &v) {
diff --git a/ddl/out/IR.hpp b/ddl/out/IR.hpp
index 3c6055f..4c6e9f1 100644
--- a/ddl/out/IR.hpp
+++ b/ddl/out/IR.hpp
@@ -1,5 +1,5 @@
1// generated file, do not modify! 1// generated file, do not modify!
2// 2015-12-21T12:00:19.420877000000Z 2// 2016-01-18T14:30:07.798481Z
3 3
4#ifndef HEADER_IR_H 4#ifndef HEADER_IR_H
5#define HEADER_IR_H 5#define HEADER_IR_H
diff --git a/ddl/out/IR.hs b/ddl/out/IR.hs
index a788161..d65d628 100644
--- a/ddl/out/IR.hs
+++ b/ddl/out/IR.hs
@@ -1,5 +1,5 @@
1-- generated file, do not modify! 1-- generated file, do not modify!
2-- 2015-12-21T12:00:19.420877000000Z 2-- 2016-01-18T14:30:07.798481Z
3 3
4{-# LANGUAGE OverloadedStrings, RecordWildCards #-} 4{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
5module IR where 5module IR where
diff --git a/ddl/out/IR.purs b/ddl/out/IR.purs
index 801e3f9..bfdeb62 100644
--- a/ddl/out/IR.purs
+++ b/ddl/out/IR.purs
@@ -1,5 +1,5 @@
1-- generated file, do not modify! 1-- generated file, do not modify!
2-- 2015-12-21T12:00:19.420877000000Z 2-- 2016-01-18T14:30:07.798481Z
3 3
4module IR where 4module IR where
5import Prelude 5import Prelude
diff --git a/ddl/out/IR.swift b/ddl/out/IR.swift
index c30e6d7..78358f4 100644
--- a/ddl/out/IR.swift
+++ b/ddl/out/IR.swift
@@ -1,5 +1,5 @@
1// generated file, do not modify! 1// generated file, do not modify!
2// 2015-12-21T12:00:19.420877000000Z 2// 2016-01-18T14:30:07.798481Z
3 3
4typealias StreamName = Int 4typealias StreamName = Int
5 5
diff --git a/ddl/out/IR2.hpp b/ddl/out/IR2.hpp
index 61fc2c6..d286395 100644
--- a/ddl/out/IR2.hpp
+++ b/ddl/out/IR2.hpp
@@ -1,5 +1,5 @@
1// generated file, do not modify! 1// generated file, do not modify!
2// 2015-12-21T12:00:19.420877000000Z 2// 2016-01-18T14:30:07.798481Z
3 3
4#ifndef HEADER_IR_H 4#ifndef HEADER_IR_H
5#define HEADER_IR_H 5#define HEADER_IR_H
diff --git a/ddl/out/Mesh.cpp b/ddl/out/Mesh.cpp
index 1661d8e..ce902bd 100644
--- a/ddl/out/Mesh.cpp
+++ b/ddl/out/Mesh.cpp
@@ -1,5 +1,5 @@
1// generated file, do not modify! 1// generated file, do not modify!
2// 2015-12-21T12:00:19.818584000000Z 2// 2016-01-18T14:30:08.223471Z
3 3
4#include "Mesh.hpp" 4#include "Mesh.hpp"
5template<> json toJSON<std::shared_ptr<MeshAttribute>>(std::shared_ptr<MeshAttribute> &v) { 5template<> json toJSON<std::shared_ptr<MeshAttribute>>(std::shared_ptr<MeshAttribute> &v) {
diff --git a/ddl/out/Mesh.hpp b/ddl/out/Mesh.hpp
index badf1da..ab8c193 100644
--- a/ddl/out/Mesh.hpp
+++ b/ddl/out/Mesh.hpp
@@ -1,5 +1,5 @@
1// generated file, do not modify! 1// generated file, do not modify!
2// 2015-12-21T12:00:19.818584000000Z 2// 2016-01-18T14:30:08.223471Z
3 3
4#ifndef HEADER_Mesh_H 4#ifndef HEADER_Mesh_H
5#define HEADER_Mesh_H 5#define HEADER_Mesh_H
diff --git a/ddl/out/Mesh.hs b/ddl/out/Mesh.hs
index 13a6996..8a5b339 100644
--- a/ddl/out/Mesh.hs
+++ b/ddl/out/Mesh.hs
@@ -1,5 +1,5 @@
1-- generated file, do not modify! 1-- generated file, do not modify!
2-- 2015-12-21T12:00:19.818584000000Z 2-- 2016-01-18T14:30:08.223471Z
3 3
4{-# LANGUAGE OverloadedStrings, RecordWildCards #-} 4{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
5module Mesh where 5module Mesh where
diff --git a/ddl/out/Mesh.purs b/ddl/out/Mesh.purs
index 230c896..725cced 100644
--- a/ddl/out/Mesh.purs
+++ b/ddl/out/Mesh.purs
@@ -1,5 +1,5 @@
1-- generated file, do not modify! 1-- generated file, do not modify!
2-- 2015-12-21T12:00:19.818584000000Z 2-- 2016-01-18T14:30:08.223471Z
3 3
4module Mesh where 4module Mesh where
5import Prelude 5import Prelude
diff --git a/ddl/out/Mesh.swift b/ddl/out/Mesh.swift
index df8ab88..82b1d20 100644
--- a/ddl/out/Mesh.swift
+++ b/ddl/out/Mesh.swift
@@ -1,5 +1,5 @@
1// generated file, do not modify! 1// generated file, do not modify!
2// 2015-12-21T12:00:19.818584000000Z 2// 2016-01-18T14:30:08.223471Z
3 3
4enum MeshAttribute { 4enum MeshAttribute {
5 case A_Float(Array<Float>) 5 case A_Float(Array<Float>)
diff --git a/ddl/out/Mesh2.hpp b/ddl/out/Mesh2.hpp
index aafa637..041fa0f 100644
--- a/ddl/out/Mesh2.hpp
+++ b/ddl/out/Mesh2.hpp
@@ -1,5 +1,5 @@
1// generated file, do not modify! 1// generated file, do not modify!
2// 2015-12-21T12:00:19.818584000000Z 2// 2016-01-18T14:30:08.223471Z
3 3
4#ifndef HEADER_Mesh_H 4#ifndef HEADER_Mesh_H
5#define HEADER_Mesh_H 5#define HEADER_Mesh_H
diff --git a/ddl/out/TypeInfo.cpp b/ddl/out/TypeInfo.cpp
index abf93a5..6834bcc 100644
--- a/ddl/out/TypeInfo.cpp
+++ b/ddl/out/TypeInfo.cpp
@@ -1,5 +1,5 @@
1// generated file, do not modify! 1// generated file, do not modify!
2// 2015-12-21T12:00:19.854088000000Z 2// 2016-01-18T14:30:08.262123Z
3 3
4#include "TypeInfo.hpp" 4#include "TypeInfo.hpp"
5template<> json toJSON<std::shared_ptr<TypeInfo>>(std::shared_ptr<TypeInfo> &v) { 5template<> json toJSON<std::shared_ptr<TypeInfo>>(std::shared_ptr<TypeInfo> &v) {
@@ -56,6 +56,7 @@ template<> json toJSON<std::shared_ptr<MyEither>>(std::shared_ptr<MyEither> &v)
56 std::shared_ptr<data::MyRight> tv = std::static_pointer_cast<data::MyRight>(v); 56 std::shared_ptr<data::MyRight> tv = std::static_pointer_cast<data::MyRight>(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 } 60 }
60 break; 61 break;
61 } 62 }
@@ -75,8 +76,9 @@ template<> std::shared_ptr<MyEither> fromJSON<std::shared_ptr<MyEither>>(W<std::
75 else if (tag == "MyRight") { 76 else if (tag == "MyRight") {
76 tagType = ::MyEither::tag::MyRight; 77 tagType = ::MyEither::tag::MyRight;
77 std::shared_ptr<data::MyRight> tv(new data::MyRight()); 78 std::shared_ptr<data::MyRight> tv(new data::MyRight());
78 tv->_0 = fromJSON(W<std::shared_ptr<::Pipeline>>(), obj["arg0"]); 79 tv->_0 = fromJSON(W<String>(), obj["arg0"]);
79 tv->_1 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), 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"]);
80 return tv; 82 return tv;
81 } 83 }
82 else throw "unknown constructor: " + tag; 84 else throw "unknown constructor: " + tag;
diff --git a/ddl/out/TypeInfo.hpp b/ddl/out/TypeInfo.hpp
index afba764..fdad33d 100644
--- a/ddl/out/TypeInfo.hpp
+++ b/ddl/out/TypeInfo.hpp
@@ -1,5 +1,5 @@
1// generated file, do not modify! 1// generated file, do not modify!
2// 2015-12-21T12:00:19.854088000000Z 2// 2016-01-18T14:30:08.262123Z
3 3
4#ifndef HEADER_TypeInfo_H 4#ifndef HEADER_TypeInfo_H
5#define HEADER_TypeInfo_H 5#define HEADER_TypeInfo_H
@@ -41,8 +41,9 @@ namespace data {
41 }; 41 };
42 class MyRight : public ::MyEither { 42 class MyRight : public ::MyEither {
43 public: 43 public:
44 std::shared_ptr<::Pipeline> _0; 44 String _0;
45 std::vector<std::shared_ptr<::TypeInfo>> _1; 45 std::shared_ptr<::Pipeline> _1;
46 std::vector<std::shared_ptr<::TypeInfo>> _2;
46 MyRight() { tag = tag::MyRight; } 47 MyRight() { tag = tag::MyRight; }
47 }; 48 };
48} 49}
diff --git a/ddl/out/TypeInfo.hs b/ddl/out/TypeInfo.hs
index 695315f..6891924 100644
--- a/ddl/out/TypeInfo.hs
+++ b/ddl/out/TypeInfo.hs
@@ -1,5 +1,5 @@
1-- generated file, do not modify! 1-- generated file, do not modify!
2-- 2015-12-21T12:00:19.854088000000Z 2-- 2016-01-18T14:30:08.262123Z
3 3
4{-# LANGUAGE OverloadedStrings, RecordWildCards #-} 4{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
5module TypeInfo where 5module TypeInfo where
@@ -30,7 +30,7 @@ data TypeInfo
30 30
31data MyEither 31data MyEither
32 = MyLeft TypeInfo (Vector TypeInfo) 32 = MyLeft TypeInfo (Vector TypeInfo)
33 | MyRight Pipeline (Vector TypeInfo) 33 | MyRight String Pipeline (Vector TypeInfo)
34 deriving (Show, Eq, Ord) 34 deriving (Show, Eq, Ord)
35 35
36 36
@@ -67,13 +67,13 @@ instance FromJSON TypeInfo where
67instance ToJSON MyEither where 67instance ToJSON MyEither 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 MyLeft arg0 arg1 -> object [ "tag" .= ("MyLeft" :: Text), "arg0" .= arg0, "arg1" .= arg1]
70 MyRight arg0 arg1 -> object [ "tag" .= ("MyRight" :: Text), "arg0" .= arg0, "arg1" .= arg1] 70 MyRight arg0 arg1 arg2 -> object [ "tag" .= ("MyRight" :: Text), "arg0" .= arg0, "arg1" .= arg1, "arg2" .= arg2]
71 71
72instance FromJSON MyEither where 72instance FromJSON MyEither 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 "MyLeft" -> MyLeft <$> obj .: "arg0" <*> obj .: "arg1"
77 "MyRight" -> MyRight <$> obj .: "arg0" <*> obj .: "arg1" 77 "MyRight" -> MyRight <$> obj .: "arg0" <*> obj .: "arg1" <*> obj .: "arg2"
78 parseJSON _ = mzero 78 parseJSON _ = mzero
79 79
diff --git a/ddl/out/TypeInfo.purs b/ddl/out/TypeInfo.purs
index d2d8351..667de39 100644
--- a/ddl/out/TypeInfo.purs
+++ b/ddl/out/TypeInfo.purs
@@ -1,5 +1,5 @@
1-- generated file, do not modify! 1-- generated file, do not modify!
2-- 2015-12-21T12:00:19.854088000000Z 2-- 2016-01-18T14:30:08.262123Z
3 3
4module TypeInfo where 4module TypeInfo where
5import Prelude 5import Prelude
@@ -30,7 +30,7 @@ data TypeInfo
30 30
31data MyEither 31data MyEither
32 = MyLeft TypeInfo (Array TypeInfo) 32 = MyLeft TypeInfo (Array TypeInfo)
33 | MyRight Pipeline (Array TypeInfo) 33 | MyRight String Pipeline (Array TypeInfo)
34 34
35 35
36 36
@@ -67,7 +67,7 @@ instance decodeJsonTypeInfo :: DecodeJson TypeInfo where
67instance encodeJsonMyEither :: EncodeJson MyEither where 67instance encodeJsonMyEither :: EncodeJson MyEither 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 MyLeft arg0 arg1 -> "tag" := "MyLeft" ~> "arg0" := arg0 ~> "arg1" := arg1 ~> jsonEmptyObject
70 MyRight arg0 arg1 -> "tag" := "MyRight" ~> "arg0" := arg0 ~> "arg1" := arg1 ~> jsonEmptyObject 70 MyRight arg0 arg1 arg2 -> "tag" := "MyRight" ~> "arg0" := arg0 ~> "arg1" := arg1 ~> "arg2" := arg2 ~> jsonEmptyObject
71 71
72instance decodeJsonMyEither :: DecodeJson MyEither where 72instance decodeJsonMyEither :: DecodeJson MyEither where
73 decodeJson json = do 73 decodeJson json = do
@@ -75,5 +75,5 @@ instance decodeJsonMyEither :: DecodeJson MyEither where
75 tag <- obj .? "tag" 75 tag <- obj .? "tag"
76 case tag of 76 case tag of
77 "MyLeft" -> MyLeft <$> obj .? "arg0" <*> obj .? "arg1" 77 "MyLeft" -> MyLeft <$> obj .? "arg0" <*> obj .? "arg1"
78 "MyRight" -> MyRight <$> obj .? "arg0" <*> obj .? "arg1" 78 "MyRight" -> MyRight <$> obj .? "arg0" <*> obj .? "arg1" <*> obj .? "arg2"
79 79
diff --git a/ddl/out/TypeInfo.swift b/ddl/out/TypeInfo.swift
index f05a343..c0c3a29 100644
--- a/ddl/out/TypeInfo.swift
+++ b/ddl/out/TypeInfo.swift
@@ -1,5 +1,5 @@
1// generated file, do not modify! 1// generated file, do not modify!
2// 2015-12-21T12:00:19.854088000000Z 2// 2016-01-18T14:30:08.262123Z
3 3
4enum TypeInfo { 4enum TypeInfo {
5 case TypeInfo(TypeInfo_Data) 5 case TypeInfo(TypeInfo_Data)
@@ -14,7 +14,7 @@ enum TypeInfo {
14 14
15enum MyEither { 15enum MyEither {
16 case MyLeft(TypeInfo,Array<TypeInfo>) 16 case MyLeft(TypeInfo,Array<TypeInfo>)
17 case MyRight(Pipeline,Array<TypeInfo>) 17 case MyRight(String,Pipeline,Array<TypeInfo>)
18} 18}
19 19
20 20
@@ -90,8 +90,8 @@ extension MyEither {
90 switch self { 90 switch self {
91 case .MyLeft(let arg0, let arg1): 91 case .MyLeft(let arg0, let arg1):
92 return [ "tag" : "MyLeft", "arg0" : arg0.toJSON, "arg1" : arg1.toJSON] 92 return [ "tag" : "MyLeft", "arg0" : arg0.toJSON, "arg1" : arg1.toJSON]
93 case .MyRight(let arg0, let arg1): 93 case .MyRight(let arg0, let arg1, let arg2):
94 return [ "tag" : "MyRight", "arg0" : arg0.toJSON, "arg1" : arg1.toJSON] 94 return [ "tag" : "MyRight", "arg0" : arg0.toJSON, "arg1" : arg1.toJSON, "arg2" : arg2.toJSON]
95 } 95 }
96 } 96 }
97} 97}
diff --git a/ddl/out/TypeInfo2.hpp b/ddl/out/TypeInfo2.hpp
index 739db82..9ac29c9 100644
--- a/ddl/out/TypeInfo2.hpp
+++ b/ddl/out/TypeInfo2.hpp
@@ -1,5 +1,5 @@
1// generated file, do not modify! 1// generated file, do not modify!
2// 2015-12-21T12:00:19.854088000000Z 2// 2016-01-18T14:30:08.262123Z
3 3
4#ifndef HEADER_TypeInfo_H 4#ifndef HEADER_TypeInfo_H
5#define HEADER_TypeInfo_H 5#define HEADER_TypeInfo_H
@@ -33,8 +33,9 @@ namespace data {
33 }; 33 };
34 class MyRight { 34 class MyRight {
35 public: 35 public:
36 std::shared_ptr<::Pipeline> _0; 36 String _0;
37 std::vector<std::shared_ptr<::TypeInfo>> _1; 37 std::shared_ptr<::Pipeline> _1;
38 std::vector<std::shared_ptr<::TypeInfo>> _2;
38 }; 39 };
39} 40}
40class MyEither { 41class MyEither {