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

JSON instance for path #677

Closed
2mol opened this issue Oct 19, 2018 · 2 comments
Closed

JSON instance for path #677

2mol opened this issue Oct 19, 2018 · 2 comments

Comments

@2mol
Copy link

2mol commented Oct 19, 2018

Hi everybody!

I want to ask if people would be open to shipping aeson with a JSON instance for path

Currently, that instance is provided by path itself, which makes it inherit the entire dependency graph of`aeson.

If aeson depended on path instead, it would gain two new transitive dependencies instead: exceptions and filepath. I think path is common and high-quality enough for that to be an ok tradeoff. Since Data.Aeson.Types includes a lot of very useful instances already, it feels like an elegant solution to include one for path as well.

How do aeson maintainers feel about this?

Or maybe there is a more elegant solution? Feel very welcome to chime in on the discussion on path's side as well: commercialhaskell/path#136

@hvr
Copy link
Member

hvr commented Oct 19, 2018

While path is popular it isn't the canonical choice for representing paths in a typesafe(r) way. The design space is huge, and path picked one specific corner. And aeson shouldn't get in the business of endorsing one competitor over the other, nor can aeson be expected to start adding instances for all packages providing a path abstraction. Hence I don't consider this a good idea.

@2mol
Copy link
Author

2mol commented Oct 19, 2018

Ok, fair enough. Thanks for weighing in so quickly though!

@2mol 2mol closed this as completed Oct 19, 2018
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

No branches or pull requests

2 participants