UUID deriving Generic
Hi!
Can we make UUID deriving Generic?
@pmlodawski UUID is an abstract data-type, i.e. its constructor is hidden so that its internal implementation can change (e.g. it could e.g. be arch-dependent whether it uses Word32 or Word64) w/o affecting the exposed API. Providing a Generic instance would weaken the abstraction as it would allow to look at the internal representation. What do you want/need a Generic instance for?
I wanted it to derive ToJSON and FromJSON.
@pmlodawski ...are you aware aeson versions now have From/ToJSON instances for UUID? :-)
Yes, but unfortunately latest ghcjs use lts-7.19.
If it is really a problem, I can manage without Generic here so we can close this. ;)
I have a similar situation where I am using UUID keys in postgresql and would like to also use them in my corresponding data types. The problem is that I am also using those data types with elm-export which requires that you derive Generic for the type.