Open qwfy opened 4 years ago
Currently, generated code for the following type:
type Token a = Number a
is:
decodeToken decodeA = Decode.field "Constructor" Decode.string |> Decode.andThen decodeTokenHelp decodeTokenHelp constructor = case constructor of "Number" -> Decode.map Number (Decode.field "A1" decodeA)
which is incorrect, (missing decodeA in decodeTokenHelp), the correct version should be:
decodeA
decodeTokenHelp
decodeToken decodeA = Decode.field "Constructor" Decode.string |> Decode.andThen (decodeTokenHelp decodeA) decodeTokenHelp decodeA constructor = case constructor of "Number" -> Decode.map Number (Decode.field "A1" decodeA)
Thank you for documenting this issue. I will provide a testing & development workflow if you feel up to it.
Currently, generated code for the following type:
is:
which is incorrect, (missing
decodeA
indecodeTokenHelp
), the correct version should be: