Various improvements from the NoRedInk/ branch#2
Merged
supermario merged 20 commits intosupermario:masterfrom Dec 23, 2017
Merged
Various improvements from the NoRedInk/ branch#2supermario merged 20 commits intosupermario:masterfrom
supermario merged 20 commits intosupermario:masterfrom
Conversation
Like all the cool kids are doing these days. :-)
It's unfortunate that we have to add this instance here, but there are like three projects at play. It doesn't make sense to push this into `servant`, it almost surely wouldn't be accepted. It doesn't make sense to push this into `servant-elm`. That would be the ideal place for it, but it would still be an orphan there. If we're going to end up with an orhpan, why bother pushing it there?
The generated decoders for what were originally Haskell new types were invalid Elm code. This commit fixes that. The newly produced Elm code might not be the most idiomatic but it gets the job done. Further improvements are definitely possible!
The previous commit fixed newtypes, but broke unit types: data Unit = Unit This adds a test case to demonstrate the fact. Writing a fix will be the next step.
The useless encoder test is currently failing. Encoding of this case is not compatible with Aeson's behaviour.
The Wrapper type is a simple Int wrapped in a newtype. Of the tests added, the encoder case is failing because it generates Elm code that does not compile.
Merge upstream changes 2
Fix single contstructor decoders
Merge upstream 2
Owner
|
Nice, thanks @jwoudenberg! I'll work through this week. I see you've also done a conversion to hpack 👍 |
Author
|
The conversion of hpack comes from Kris' commits (from the devel branch). |
Owner
|
Ah. 😅 |
Owner
|
Ok - I'm going to merge this in and then work on updating the changelog and reconciling a few things, including the removal of cb1966c due to issues documented in krisajenkins#48. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed previously @supermario, these are some changes we added on our fork of
elm-export. We'd love to combine these all in one place.newtypeandunittypes.ElmTypeinstance for servantHeaders.