You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module Common exposing (..)
type alias Id =
Int
type alias EmpireId =
Id
type alias Empire =
{ id : EmpireId
, name : String
}
Running
python generate.py Common.elm
yields
decodeId = Inttype alias EmpireId = Idtype alias Empire : Json.Decode.Decoder Id = Inttype alias EmpireId = Idtype alias Empire
decodeId = Inttype alias EmpireId = Idtype alias Empire =
Json.Decode.succeed Id = Inttype alias EmpireId = Idtype alias Empire
|: ("id" := decodeEmpireid)
|: ("name" := Json.Decode.string)
encodeId = Inttype alias EmpireId = Idtype alias Empire : Id = Inttype alias EmpireId = Idtype alias Empire -> Json.Encode.Value
encodeId = Inttype alias EmpireId = Idtype alias Empire record =
Json.Encode.object
[ ("id", encodeEmpireid record.id)
, ("name", Json.Encode.string record.name)
]
Not sure if I'm doing something wrong o_O
The text was updated successfully, but these errors were encountered:
Given the input file
Common.elm
:Running
yields
Not sure if I'm doing something wrong o_O
The text was updated successfully, but these errors were encountered: