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
which incorrectly has the type of fromStringInterestLevel : InterestLevel -> Result String String. It should be fromStringInterestLevel : String -> Result String InterestLevel.
Also, the generated code for decodeInterestLevel should be decodeInterestLevel = Json.Decode.customDecoder Json.Decode.string fromStringInterestLevel
The text was updated successfully, but these errors were encountered:
avh4
changed the title
fromString... function is generated with an incorrect type
Union types generate incorrect code
Jul 22, 2016
This input
yields
which incorrectly has the type of
fromStringInterestLevel : InterestLevel -> Result String String
. It should befromStringInterestLevel : String -> Result String InterestLevel
.Also, the generated code for
decodeInterestLevel
should bedecodeInterestLevel = Json.Decode.customDecoder Json.Decode.string fromStringInterestLevel
The text was updated successfully, but these errors were encountered: