Closed ivan-m closed 7 years ago
Nevermind, I found discussions elsewhere about how this (or more specifically, a FromRow a => FromRow (Maybe a)
instance) would break other instances (and there are more specific instances available anyway).
Which is a pity, but I guess I have to do a manual FromRow
instance of my datatype then.
Could you link the discussions? Personally, I'd love to have the FromRow a => FromRow (Maybe a)
instance, there are already some less generic instances to that effect, but IIRC the issue isn't so much that it would break anything too important, but rather that one can't implement that with the current interface. (Which would break client code, which is sad, but I'm willing to do that if the change represents actual progress.)
There's some discussion on #64, I suppose #178 (which is why just using optional
fails) and your announcement for 0.4.2.
I think changing the representation only causes problems for users who need to parse a variable number of fields using the instance for [a]
. I would personally prefer a representation that tracked how many fields were being consumed, since the current interface is bad for left joins.
Is there any particular reason this instance isn't defined?
The lack of this instance is stopping the Generic deriving working for my datatypes; not sure if there's a deliberate reason it's missing though.