-
Notifications
You must be signed in to change notification settings - Fork 329
Higherkinded special strings #391
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
Higherkinded special strings #391
Conversation
{-# INLINE list #-} | ||
|
||
listValue :: (a -> Value) -> [a] -> Value | ||
listValue f = Array . V.fromList . map f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps list
should be renamed to listEncoding
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I had only left it named list
here because I stole it out of Data.Aeson.Encode.Functions
, but listEncoding
is a much better name.
Pushed some more changes that incorporate the suggestions from @RyanGlScott. |
@andrewthad could you rebase it. Can you write lifted instances for |
@phadej I've merged changes from master into this branch. I've also added the higher kinded instances for Map and HashMap. Feel free to take over this branch and add any more instances. I won't have any time to look at it for the next few days. Also, there's one thing that could use some review. I left the |
Closing in favor of #407 |
This PR was formed by:
ToJSON1
, etc.)I would appreciate any feedback if anyone sees anything that looks wrong. In particular, it's possible that I ended up with a non-list container that serializes to a json string instead of an array. All existing tests are still passing.