@@ -32,8 +32,7 @@ data Type
3232
3333data Program =
3434 Program
35− { _model :: Type
36− , _msg :: Type
35+ { _message :: Type
3736 , _aliases :: [( String, [String], Type )]
3837 , _unions :: [( String, [String], [(String, [Type])] )]
3938 }
@@ -216,10 +215,9 @@ fromRawType (A.A _ astType) =
216215
217216
218217instance Json.ToJSON Program where
219− toJSON (Program model msg aliases unions) =
218+ toJSON (Program msg aliases unions) =
220219 Json.object
221− [ "model" .= model
222− , "message" .= msg
220+ [ "message" .= msg
223221 , "aliases" .= Json.object (map toAliasField aliases)
224222 , "unions" .= Json.object (map toUnionField unions)
225223 ]
@@ -237,7 +235,7 @@ toUnionField :: ( String, [String], [(String, [Type])] ) -> Json.Pair
237235toUnionField ( name, args, constructors ) =
238236 Text.pack name .= Json.object
239237 [ "args" .= args
240− , "type" .= Json.object (map toCtorObject constructors)
238+ , "tags" .= Json.object (map toCtorObject constructors)
241239 ]
242240
243241