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

extend aeson support to wrapped types #423

Closed
bos opened this issue Apr 18, 2014 · 2 comments
Closed

extend aeson support to wrapped types #423

bos opened this issue Apr 18, 2014 · 2 comments

Comments

@bos
Copy link

bos commented Apr 18, 2014

At the moment, combinators like key are polymorphic over some types, but not all. For instance, I can use key on either a ByteString or a Value.

The http-client library defines a Response type, such that I can have a Response ByteString or a Response Value. I cannot currently figure out how to swizzle the various moving parts such that I can use key and other combinators on one of these.

(Of course I have a responseBody lens, so I can write responseBody . key "foo", but my wish is to be able to more simply write key "foo" instead.)

@ekmett ekmett self-assigned this Apr 18, 2014
@ekmett
Copy link
Owner

ekmett commented Apr 18, 2014

It isn't currently possible, but we could change the API to support this usecase.

@glguy
Copy link
Collaborator

glguy commented Aug 18, 2014

Issue moved to lens/lens-aeson#7

@glguy glguy closed this as completed Aug 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants