Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Err (Parsing "TODO deadEndsToString") #4

Open
jxxcarlson opened this issue Dec 11, 2019 · 0 comments
Open

Err (Parsing "TODO deadEndsToString") #4

jxxcarlson opened this issue Dec 11, 2019 · 0 comments

Comments

@jxxcarlson
Copy link

Hi, I've run into an error I can't seem to get around -- could just be me, but here is a stripped down version. The problem arises with code like

decodeItem : Decoder ( String, Int )
decodeItem =
    Decode.string
        |> Decode.andThen baz

I've reduced baz to a bare minimum, so that it always succeeds, always returning the same thing:

baz : String -> Decoder ( String, number )
baz =
    \s -> Decode.succeed ( "Test", 88 )

Here is the error:

↓ VerifyExamples.Yaml.DecodeItem0
✗ #decodeItem:

    Decode.fromString decodeItem "(Test:88)"
    --> Ok ("Test", 88)

    Ok ("Test",88)
    ╷
    │ Expect.equal
    ╵
    Err (Parsing "TODO deadEndsToString")

And here is the test code:

{-|

    import Yaml.Decode as Decode exposing (Decoder)

    Decode.fromString decodeItem "(Test:88)"
    --> Ok ("Test", 88)

-}
decodeItem : Decoder ( String, Int )
decodeItem =
    Decode.string
        |> Decode.andThen baz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant