Closed mikeplus64 closed 1 month ago
This all looks interesting and may be a good basis for your own library. You clearly have a vision there. If your lib will become the norm I'll deprecate this one and replace it with yours in hasql-dynamic-statements.
Also please beware that there also exists at least one other library in this category. There may be more.
There's also a lib for generics.
Fair enough. I hadn't seen those other two libraries. The only sad part is thinking of a name zingier than "hasql-implicits" :). I guess "hasql-defaults" is OK.
Would be nice to have some implicit decoders as well.
Something like
Rows, if they are to be added, are probably calling for something like
product-profunctors
where the idea is to promote a constructor [or anything likesqlType -> hsType
] to a parser for that constructor. Or usingGeneric
is quite doable though inevitably annoying when a new GHC version breaks it. Or rolling your own minimal version of profunctors isn't so bad: