haskell-hvr / uuid

A Haskell library for creating, printing and parsing UUIDs
http://hackage.haskell.org/package/uuid
61 stars 38 forks source link

FromJSON and ToJSON Instances #20

Closed tdietert closed 7 years ago

tdietert commented 8 years ago

Is there any way we can merge the package uuid-aeson (https://hackage.haskell.org/package/uuid-aeson) with this package? To my knowlege, the only things that package provides are the ToJSON and FromJSON instances for UUIDs. Or is there something I'm overlooking that doesn't warrant a merge of the packages?

mulderr commented 8 years ago

Wouldn't that force aeson dependency? If so, then it would be a bit overeager if you ask me. There are plenty valid use cases where you don't need JSON.

hvr commented 7 years ago

I think it makes more sense to de-orphan those instances by moving them into aeson; uuid-types has a very light dependency footprint and doesn't depend on anything aeson doesn't already depend on.

/cc @bergmark @phadej

phadej commented 7 years ago

https://github.com/bos/aeson/issues/432

phadej commented 7 years ago

my opinion: uuid-types is indeed very light dependency, but it's up to @bergmark and other aeson maintainers.

bergmark commented 7 years ago

I think it's a good idea to add this to aeson! Could someone volunteer to make a PR for this please? We can try to push a new release next week.

phadej commented 7 years ago

I'll do it, asap, edit: done

hvr commented 7 years ago

For reference, PR can be found at https://github.com/bos/aeson/pull/485

hvr commented 7 years ago

I think we can close this since aeson-1.1.0.0 has just been released which provides non-orphan instances for UUID (even though the changelog doesn't mention it... hint hint /cc @phadej).