diff options
Diffstat (limited to 'ddl/out/LambdaCube.TypeInfo.purs')
-rw-r--r-- | ddl/out/LambdaCube.TypeInfo.purs | 20 |
1 files changed, 10 insertions, 10 deletions
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 | ||