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

Problem parsing type annotation with siblings params #14

Closed
rogeriochaves opened this issue Jun 10, 2018 · 3 comments
Closed

Problem parsing type annotation with siblings params #14

rogeriochaves opened this issue Jun 10, 2018 · 3 comments
Labels

Comments

@rogeriochaves
Copy link
Contributor

rogeriochaves commented Jun 10, 2018

elm-syntax is parsing type annotations like Dict String Int as if it were nested, like Dict (String Int)

I've written a failing test that you can add to tests/Elm/Parser/TypeAnnotationTests.elm to verify, but I couldn't fix the problem:

test "parse type with multiple params" <|
    \() ->
        parseFullStringWithNullState "Dict String Int" Parser.typeAnnotation
            |> Maybe.map noRangeTypeReference
            |> Expect.equal
                (Just
                    ( emptyRange
                    , Typed []
                        "Dict"
                        [ ( emptyRange, Typed [] "String" [] )
                        , ( emptyRange, Typed [] "Int" [] )
                        ]
                    )
                )
@stil4m
Copy link
Owner

stil4m commented Jun 11, 2018

Thanks. I'll look into this.

@rogeriochaves
Copy link
Contributor Author

rogeriochaves commented Jun 11, 2018

This issue is already fixed right? I'll close it
Hey, since you are here, thank you so very much for the quick responses, merges, publishing and even this quick fix

Here is what I've built using your library :)

https://github.com/rogeriochaves/spades

@stil4m
Copy link
Owner

stil4m commented Jun 12, 2018

It is fixed and released. It was a simple fix, since I've already encountered it on the 0.19 branch. Thank you for creating descriptive issues and concise to-the-point PRs ;).

Cool! It is always nice to see that if you build something, someone is using it :). If you need any support on the lib (elm-syntax or structured-writer) you can also ping me on Slack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants