diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-02-26 12:37:59 +0100 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-02-26 12:37:59 +0100 |
commit | 2eb7cc7fab543a1ffb493015d98c1887ffac38c9 (patch) | |
tree | 81101bf1011c557a7f818c7b893b51923ab82892 /ddl | |
parent | 5ea5e05a87c76d80194dbdfac177994aa870b783 (diff) |
tweak CompileResult type
Diffstat (limited to 'ddl')
31 files changed, 50 insertions, 46 deletions
diff --git a/ddl/Definitions.hs b/ddl/Definitions.hs index 1849ed2..7aa32bd 100644 --- a/ddl/Definitions.hs +++ b/ddl/Definitions.hs | |||
@@ -474,7 +474,7 @@ typeInfo = do | |||
474 | ] | 474 | ] |
475 | 475 | ||
476 | data_ "CompileResult" $ do | 476 | data_ "CompileResult" $ do |
477 | const_ "CompileError" [Array "TypeInfo", Array "TypeInfo"] | 477 | const_ "CompileError" [Array "Range", String, Array "TypeInfo"] |
478 | const_ "Compiled" [String, "Pipeline", Array "TypeInfo"] | 478 | const_ "Compiled" [String, "Pipeline", Array "TypeInfo"] |
479 | 479 | ||
480 | pipelineSchema = do | 480 | pipelineSchema = do |
diff --git a/ddl/out/LambdaCube.IR.cpp b/ddl/out/LambdaCube.IR.cpp index dfe47f8..1185dde 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-26T11:29:11.442441000000Z | 2 | // 2016-02-26T11:37:22.233668000000Z |
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 6e10c94..afd560b 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-26T11:29:11.442441000000Z | 2 | // 2016-02-26T11:37:22.233668000000Z |
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 0bed2ec..70a0788 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-26T11:29:11.442441000000Z | 2 | -- 2016-02-26T11:37:22.233668000000Z |
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 ac7e585..2bec655 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-26T11:29:11.442441000000Z | 2 | -- 2016-02-26T11:37:22.233668000000Z |
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 6aa412d..884e3dc 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-26T11:29:11.442441000000Z | 2 | // 2016-02-26T11:37:22.233668000000Z |
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 6564ba1..ed23b5d 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-26T11:29:11.442441000000Z | 2 | // 2016-02-26T11:37:22.233668000000Z |
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 25ea594..1b24da2 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-26T11:29:11.794796000000Z | 2 | // 2016-02-26T11:37:22.580893000000Z |
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 9f84d29..f643d1f 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-26T11:29:11.794796000000Z | 2 | // 2016-02-26T11:37:22.580893000000Z |
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 0a25a4d..f1c7a3b 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-26T11:29:11.794796000000Z | 2 | -- 2016-02-26T11:37:22.580893000000Z |
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 c80739d..77e54c8 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-26T11:29:11.794796000000Z | 2 | -- 2016-02-26T11:37:22.580893000000Z |
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 92b35b1..4e0f689 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-26T11:29:11.794796000000Z | 2 | // 2016-02-26T11:37:22.580893000000Z |
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 960b61a..6c36caf 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-26T11:29:11.794796000000Z | 2 | // 2016-02-26T11:37:22.580893000000Z |
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 1d4b81a..34c2138 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-26T11:29:11.775644000000Z | 2 | // 2016-02-26T11:37:22.561871000000Z |
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 16a0f8d..2cba072 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-26T11:29:11.775644000000Z | 2 | // 2016-02-26T11:37:22.561871000000Z |
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 55ae6f8..3d4f612 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-26T11:29:11.775644000000Z | 2 | -- 2016-02-26T11:37:22.561871000000Z |
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 eb467b2..a6da8d6 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-26T11:29:11.775644000000Z | 2 | -- 2016-02-26T11:37:22.561871000000Z |
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 93ed8ef..479af91 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-26T11:29:11.775644000000Z | 2 | // 2016-02-26T11:37:22.561871000000Z |
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 585da42..efdff06 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-26T11:29:11.775644000000Z | 2 | // 2016-02-26T11:37:22.561871000000Z |
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 a965e4f..c68fc2d 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-26T11:29:11.823283000000Z | 2 | // 2016-02-26T11:37:22.609565000000Z |
3 | 3 | ||
4 | #include "LambdaCube.TypeInfo.hpp" | 4 | #include "LambdaCube.TypeInfo.hpp" |
5 | template<> json toJSON<std::shared_ptr<Range>>(std::shared_ptr<Range> &v) { | 5 | template<> json toJSON<std::shared_ptr<Range>>(std::shared_ptr<Range> &v) { |
@@ -77,6 +77,7 @@ template<> json toJSON<std::shared_ptr<CompileResult>>(std::shared_ptr<CompileRe | |||
77 | std::shared_ptr<data::CompileError> tv = std::static_pointer_cast<data::CompileError>(v); | 77 | std::shared_ptr<data::CompileError> tv = std::static_pointer_cast<data::CompileError>(v); |
78 | obj["arg0"] = toJSON(tv->_0); | 78 | obj["arg0"] = toJSON(tv->_0); |
79 | obj["arg1"] = toJSON(tv->_1); | 79 | obj["arg1"] = toJSON(tv->_1); |
80 | obj["arg2"] = toJSON(tv->_2); | ||
80 | } | 81 | } |
81 | break; | 82 | break; |
82 | case ::CompileResult::tag::Compiled: | 83 | case ::CompileResult::tag::Compiled: |
@@ -98,8 +99,9 @@ template<> std::shared_ptr<CompileResult> fromJSON<std::shared_ptr<CompileResult | |||
98 | if (tag == "CompileError") { | 99 | if (tag == "CompileError") { |
99 | tagType = ::CompileResult::tag::CompileError; | 100 | tagType = ::CompileResult::tag::CompileError; |
100 | std::shared_ptr<data::CompileError> tv(new data::CompileError()); | 101 | std::shared_ptr<data::CompileError> tv(new data::CompileError()); |
101 | tv->_0 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg0"]); | 102 | tv->_0 = fromJSON(W<std::vector<std::shared_ptr<::Range>>>(), obj["arg0"]); |
102 | tv->_1 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg1"]); | 103 | tv->_1 = fromJSON(W<String>(), obj["arg1"]); |
104 | tv->_2 = fromJSON(W<std::vector<std::shared_ptr<::TypeInfo>>>(), obj["arg2"]); | ||
103 | return tv; | 105 | return tv; |
104 | } | 106 | } |
105 | else if (tag == "Compiled") { | 107 | else if (tag == "Compiled") { |
diff --git a/ddl/out/LambdaCube.TypeInfo.hpp b/ddl/out/LambdaCube.TypeInfo.hpp index 993388d..ec24562 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-26T11:29:11.823283000000Z | 2 | // 2016-02-26T11:37:22.609565000000Z |
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 |
@@ -48,8 +48,9 @@ class CompileResult { | |||
48 | namespace data { | 48 | namespace data { |
49 | class CompileError : public ::CompileResult { | 49 | class CompileError : public ::CompileResult { |
50 | public: | 50 | public: |
51 | std::vector<std::shared_ptr<::TypeInfo>> _0; | 51 | std::vector<std::shared_ptr<::Range>> _0; |
52 | std::vector<std::shared_ptr<::TypeInfo>> _1; | 52 | String _1; |
53 | std::vector<std::shared_ptr<::TypeInfo>> _2; | ||
53 | CompileError() { tag = tag::CompileError; } | 54 | CompileError() { tag = tag::CompileError; } |
54 | }; | 55 | }; |
55 | class Compiled : public ::CompileResult { | 56 | class Compiled : public ::CompileResult { |
diff --git a/ddl/out/LambdaCube.TypeInfo.hs b/ddl/out/LambdaCube.TypeInfo.hs index 01bf5a6..38a3e48 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-26T11:29:11.823283000000Z | 2 | -- 2016-02-26T11:37:22.609565000000Z |
3 | 3 | ||
4 | {-# LANGUAGE OverloadedStrings, RecordWildCards #-} | 4 | {-# LANGUAGE OverloadedStrings, RecordWildCards #-} |
5 | module LambdaCube.TypeInfo where | 5 | module LambdaCube.TypeInfo where |
@@ -36,7 +36,7 @@ data TypeInfo | |||
36 | deriving (Show, Eq, Ord) | 36 | deriving (Show, Eq, Ord) |
37 | 37 | ||
38 | data CompileResult | 38 | data CompileResult |
39 | = CompileError (Vector TypeInfo) (Vector TypeInfo) | 39 | = CompileError (Vector Range) String (Vector TypeInfo) |
40 | | Compiled String Pipeline (Vector TypeInfo) | 40 | | Compiled String Pipeline (Vector TypeInfo) |
41 | deriving (Show, Eq, Ord) | 41 | deriving (Show, Eq, Ord) |
42 | 42 | ||
@@ -91,14 +91,14 @@ instance FromJSON TypeInfo where | |||
91 | 91 | ||
92 | instance ToJSON CompileResult where | 92 | instance ToJSON CompileResult where |
93 | toJSON v = case v of | 93 | toJSON v = case v of |
94 | CompileError arg0 arg1 -> object [ "tag" .= ("CompileError" :: Text), "arg0" .= arg0, "arg1" .= arg1] | 94 | CompileError arg0 arg1 arg2 -> object [ "tag" .= ("CompileError" :: Text), "arg0" .= arg0, "arg1" .= arg1, "arg2" .= arg2] |
95 | Compiled arg0 arg1 arg2 -> object [ "tag" .= ("Compiled" :: Text), "arg0" .= arg0, "arg1" .= arg1, "arg2" .= arg2] | 95 | Compiled arg0 arg1 arg2 -> object [ "tag" .= ("Compiled" :: Text), "arg0" .= arg0, "arg1" .= arg1, "arg2" .= arg2] |
96 | 96 | ||
97 | instance FromJSON CompileResult where | 97 | instance FromJSON CompileResult where |
98 | parseJSON (Object obj) = do | 98 | parseJSON (Object obj) = do |
99 | tag <- obj .: "tag" | 99 | tag <- obj .: "tag" |
100 | case tag :: Text of | 100 | case tag :: Text of |
101 | "CompileError" -> CompileError <$> obj .: "arg0" <*> obj .: "arg1" | 101 | "CompileError" -> CompileError <$> obj .: "arg0" <*> obj .: "arg1" <*> obj .: "arg2" |
102 | "Compiled" -> Compiled <$> obj .: "arg0" <*> obj .: "arg1" <*> obj .: "arg2" | 102 | "Compiled" -> Compiled <$> obj .: "arg0" <*> obj .: "arg1" <*> obj .: "arg2" |
103 | parseJSON _ = mzero | 103 | parseJSON _ = mzero |
104 | 104 | ||
diff --git a/ddl/out/LambdaCube.TypeInfo.purs b/ddl/out/LambdaCube.TypeInfo.purs index 8641df1..87af438 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-26T11:29:11.823283000000Z | 2 | -- 2016-02-26T11:37:22.609565000000Z |
3 | 3 | ||
4 | module LambdaCube.TypeInfo where | 4 | module LambdaCube.TypeInfo where |
5 | import Prelude | 5 | import Prelude |
@@ -35,7 +35,7 @@ data TypeInfo | |||
35 | 35 | ||
36 | 36 | ||
37 | data CompileResult | 37 | data CompileResult |
38 | = CompileError (Array TypeInfo) (Array TypeInfo) | 38 | = CompileError (Array Range) String (Array TypeInfo) |
39 | | Compiled String Pipeline (Array TypeInfo) | 39 | | Compiled String Pipeline (Array TypeInfo) |
40 | 40 | ||
41 | 41 | ||
@@ -90,7 +90,7 @@ instance decodeJsonTypeInfo :: DecodeJson TypeInfo where | |||
90 | 90 | ||
91 | instance encodeJsonCompileResult :: EncodeJson CompileResult where | 91 | instance encodeJsonCompileResult :: EncodeJson CompileResult where |
92 | encodeJson v = case v of | 92 | encodeJson v = case v of |
93 | CompileError arg0 arg1 -> "tag" := "CompileError" ~> "arg0" := arg0 ~> "arg1" := arg1 ~> jsonEmptyObject | 93 | CompileError arg0 arg1 arg2 -> "tag" := "CompileError" ~> "arg0" := arg0 ~> "arg1" := arg1 ~> "arg2" := arg2 ~> jsonEmptyObject |
94 | Compiled arg0 arg1 arg2 -> "tag" := "Compiled" ~> "arg0" := arg0 ~> "arg1" := arg1 ~> "arg2" := arg2 ~> jsonEmptyObject | 94 | Compiled arg0 arg1 arg2 -> "tag" := "Compiled" ~> "arg0" := arg0 ~> "arg1" := arg1 ~> "arg2" := arg2 ~> jsonEmptyObject |
95 | 95 | ||
96 | instance decodeJsonCompileResult :: DecodeJson CompileResult where | 96 | instance decodeJsonCompileResult :: DecodeJson CompileResult where |
@@ -98,6 +98,6 @@ instance decodeJsonCompileResult :: DecodeJson CompileResult where | |||
98 | obj <- decodeJson json | 98 | obj <- decodeJson json |
99 | tag <- obj .? "tag" | 99 | tag <- obj .? "tag" |
100 | case tag of | 100 | case tag of |
101 | "CompileError" -> CompileError <$> obj .? "arg0" <*> obj .? "arg1" | 101 | "CompileError" -> CompileError <$> obj .? "arg0" <*> obj .? "arg1" <*> obj .? "arg2" |
102 | "Compiled" -> Compiled <$> obj .? "arg0" <*> obj .? "arg1" <*> obj .? "arg2" | 102 | "Compiled" -> Compiled <$> obj .? "arg0" <*> obj .? "arg1" <*> obj .? "arg2" |
103 | 103 | ||
diff --git a/ddl/out/LambdaCube.TypeInfo.swift b/ddl/out/LambdaCube.TypeInfo.swift index 504c232..e55314d 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-26T11:29:11.823283000000Z | 2 | // 2016-02-26T11:37:22.609565000000Z |
3 | 3 | ||
4 | enum Range { | 4 | enum Range { |
5 | case Range(Range_Data) | 5 | case Range(Range_Data) |
@@ -20,7 +20,7 @@ enum TypeInfo { | |||
20 | } | 20 | } |
21 | 21 | ||
22 | enum CompileResult { | 22 | enum CompileResult { |
23 | case CompileError(Array<TypeInfo>,Array<TypeInfo>) | 23 | case CompileError(Array<Range>,String,Array<TypeInfo>) |
24 | case Compiled(String,Pipeline,Array<TypeInfo>) | 24 | case Compiled(String,Pipeline,Array<TypeInfo>) |
25 | } | 25 | } |
26 | 26 | ||
@@ -105,8 +105,8 @@ extension TypeInfo { | |||
105 | extension CompileResult { | 105 | extension CompileResult { |
106 | var toJSON : [String: AnyObject] { | 106 | var toJSON : [String: AnyObject] { |
107 | switch self { | 107 | switch self { |
108 | case .CompileError(let arg0, let arg1): | 108 | case .CompileError(let arg0, let arg1, let arg2): |
109 | return [ "tag" : "CompileError", "arg0" : arg0.toJSON, "arg1" : arg1.toJSON] | 109 | return [ "tag" : "CompileError", "arg0" : arg0.toJSON, "arg1" : arg1.toJSON, "arg2" : arg2.toJSON] |
110 | case .Compiled(let arg0, let arg1, let arg2): | 110 | case .Compiled(let arg0, let arg1, let arg2): |
111 | return [ "tag" : "Compiled", "arg0" : arg0.toJSON, "arg1" : arg1.toJSON, "arg2" : arg2.toJSON] | 111 | return [ "tag" : "Compiled", "arg0" : arg0.toJSON, "arg1" : arg1.toJSON, "arg2" : arg2.toJSON] |
112 | } | 112 | } |
diff --git a/ddl/out/LambdaCube.TypeInfo2.hpp b/ddl/out/LambdaCube.TypeInfo2.hpp index b5c16d7..ebd50aa 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-26T11:29:11.823283000000Z | 2 | // 2016-02-26T11:37:22.609565000000Z |
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 |
@@ -41,8 +41,9 @@ public: | |||
41 | namespace data { | 41 | namespace data { |
42 | class CompileError { | 42 | class CompileError { |
43 | public: | 43 | public: |
44 | std::vector<std::shared_ptr<::TypeInfo>> _0; | 44 | std::vector<std::shared_ptr<::Range>> _0; |
45 | std::vector<std::shared_ptr<::TypeInfo>> _1; | 45 | String _1; |
46 | std::vector<std::shared_ptr<::TypeInfo>> _2; | ||
46 | }; | 47 | }; |
47 | class Compiled { | 48 | class Compiled { |
48 | public: | 49 | public: |
diff --git a/ddl/out/TestData.cpp b/ddl/out/TestData.cpp index 881c6ba..416815d 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-26T11:29:11.839781000000Z | 2 | // 2016-02-26T11:37:22.627476000000Z |
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 b49ee9c..3033688 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-26T11:29:11.839781000000Z | 2 | // 2016-02-26T11:37:22.627476000000Z |
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 ec33f72..4fb6aa3 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-26T11:29:11.839781000000Z | 2 | -- 2016-02-26T11:37:22.627476000000Z |
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 02942ca..fa1fff4 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-26T11:29:11.839781000000Z | 2 | -- 2016-02-26T11:37:22.627476000000Z |
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 6a1a868..7ad54c5 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-26T11:29:11.839781000000Z | 2 | // 2016-02-26T11:37:22.627476000000Z |
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 0ec32f2..f07dd13 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-26T11:29:11.839781000000Z | 2 | // 2016-02-26T11:37:22.627476000000Z |
3 | 3 | ||
4 | #ifndef HEADER_TestData_H | 4 | #ifndef HEADER_TestData_H |
5 | #define HEADER_TestData_H | 5 | #define HEADER_TestData_H |