squeal
squeal copied to clipboard
Add tuple row decoders
There should be row decoders for common cases of tuples. How far up should it go? Maybe only up to quadrupleRow?
pairRow
:: (FromValue x0 ty0, FromValue x1 ty1)
=> DecodeRow '[col0 ::: ty0, col1 ::: ty1] (x0,x1)
tripleRow
:: (FromValue x0 ty0, FromValue x1 ty1, FromValue x2 ty2)
=> DecodeRow '[col0 ::: ty0, col1 ::: ty1, col2 ::: ty2] (x0,x1,x2)
Should there be a singleRow?
Alternatively, a single function genericProductRow could be added. This would mirror current encoders.
genericRow / genericRowParams would match records (position and field) as decoder / encoder
genericProductRow / genericParams would match products (position) including records & tuples as decoder / encoder