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

Remove elm-community/json-extra as a dependency of the generated code #68

Merged
merged 10 commits into from
Apr 14, 2024

Conversation

wolfadex
Copy link
Owner

@wolfadex wolfadex commented Apr 14, 2024

Resolves #63

Also updates some dependencies

@wolfadex wolfadex requested a review from miniBill April 14, 2024 17:43
@@ -1878,6 +1878,39 @@ typeToDecoder type_ =
CliMonad.todo "Bytes decoder not implemented yet"


jsonDecodeAndMap : Elm.Declaration
jsonDecodeAndMap =
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried using Elm.Declaration.fn2 but the type annotation kept being generated as

Json.Decode.Decoder a -> Json.Decode.Decoder (a -> b) -> Json.Decode.Decoder value

when I used Elm.val "(|>)", and when I tried used an anonymous function instead running the codegen would hang indefinitely.

This felt like a fine compromise

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine. Eventually we'll have @Janiczek's type inference and all these bugs will be lost in time, like tears in rain...

@wolfadex wolfadex merged commit be74458 into main Apr 14, 2024
1 check passed
@miniBill miniBill deleted the wolfadex/remove-json-extra branch April 25, 2024 19:01
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

Successfully merging this pull request may close these issues.

Vendor the necessary parts of elm-community/json-extra
2 participants